-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poetry install
doesn't add license files to dist-info
directory
#9836
Comments
poetry install is doing an editable install, pretty much all of the files in your project are not copied around. Why do you want LICENSE to be copied? Indeed, what is the expected behaviour for an editable install if you update the LICENSE file in your project directory? Do you want a stale LICENSE file to be left in the dist-info? |
The reason I'd like to have Regarding your second paragraph: true, After looking a bit into the codebase, I think it will be less effort for me to mock in my tests than to submit a PR. |
METADATA is a generated file that poetry is required to create by the spec describing editable installs In contrast, I see LICENSE as more analogous with any other part of the source tree - therefore in my opinion it would be undesirable to copy it around at an editable install. Especially if it's anyway less effort for you not to pursue this then I'd just close it out. (By the way, it seems curious to be trying to check the license of your own project. That's surely the one project where you really should already know the answer...) |
Once we implement PEP 639 this will be a valid request, until then I close it as a duplicate of #9670 |
I don't see that PEP639 has anything to say about editable installs; but that discussion can wait until someone does something about PEP639 |
The editable wheels (PEP 660) spec says that they should be installed just like regular wheels, which means that new changes to |
Of course I know the license of the package itself. The problem lies in running the tests.
During testing in a CI/CD pipeline I'm in case (2) since I haven't built and published yet. As said, I understand that you have a different opinion, thus feel free to close this issue. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 tovenv/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 asImpact
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.The text was updated successfully, but these errors were encountered: