Skip to content

poetry install doesn't add license files to dist-info directory #9836

@andreasdoll

Description

@andreasdoll

Issue Kind

Change in current behaviour

Description

Hello

I want to add license files to the dist-info directory when using poetry install.

Currently the automatic inclusion of license files only applies the wheels/sdist (when using poetry build).
When using poetry install, no license file gets added to venv/Lib/site-packages/my_pkg-1.2.3.dist-info/ directory.

Is it intended behavior that install doesn't add the license files?
Can I achieve my goal somehow without modifying poetry?
If not: would you rather add the automatic inclusion to install, or manually as

[tool.poetry] 
include = [
    { path = "LICENSE.txt", format = "dist-info" },
]

Impact

My motivation is a tool dealing with licenses. In a CI/CD pipeline, I use poetry install to setup the environment in which I perform unit tests, and in this setup the license files are missing from the dist-info directory.

No issue when installing this tool from a package index, since in this case I use build outputs (wheel/sdist). which indeed have the license file automatically added.

Workarounds

No workaround known, since the include functionality in [tool.poetry] targets only wheels/sdist.

Metadata

Metadata

Assignees

Labels

kind/featureFeature requests/implementations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions