Skip to content
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

Do not pollute site-packages #29

Closed
moubctez opened this issue May 19, 2023 · 3 comments
Closed

Do not pollute site-packages #29

moubctez opened this issue May 19, 2023 · 3 comments

Comments

@moubctez
Copy link

Currently, LICENSE and README.md get installed into site-packages directory. This is bad, for obvious reasons.

I used this patch to fix the problem:

--- pyproject.toml.orig	2023-05-19 20:37:05.000000000 +0000
+++ pyproject.toml
@@ -24,11 +24,6 @@ keywords=["pylint","plugin","helpers"]
 packages = [
   {include = "pylint_plugin_utils/"}
 ]
-include = [
-  "LICENSE",
-  "*.rst",
-  "*.md"
-]
 
 [tool.poetry.dependencies]
 python = ">=3.7,<4.0"
@carlio
Copy link
Collaborator

carlio commented May 20, 2023

Hmm, this appears to be an unintended side effect of using poetry that I did not know about: python-poetry/poetry#2015 (comment)

I will figure out how to fix this properly. Removing the include section does prevent the pollution, though if possible I would like to include the LICENSE file next to the code instead of in the venv root.

carlio pushed a commit that referenced this issue May 20, 2023
…section, as this had unintended consequences of installing them into the site-packages directory instead of along side the package code. This is related to python-poetry/poetry#2015 . Since the LICENSE is available in the dist-info directory along side the package, then this is sufficient.

Additionally, the python version classifiers will be automatically added by poetry from the version range specification in the tool.poetry.dependencies section, so no need to explicitly define them.
@carlio
Copy link
Collaborator

carlio commented May 20, 2023

I have fixed this and released 0.8.2 now. The LICENSE is available inside the .dist-info directory along side the source code, which is sufficient in my view, and it will not be accidentally installed in the site-packages directory now.

(ignore the failing build, coveralls.io API just failed)

@carlio carlio closed this as completed May 20, 2023
@carlio
Copy link
Collaborator

carlio commented May 20, 2023

Note that this same issue will be in other libraries I maintain so likely the LICENSE file will still be there just from another library, if you're using something like pylint-django or prospector... I will go fix those now too.

carlio pushed a commit to landscapeio/prospector that referenced this issue May 20, 2023
…e-packages directly instead of next the source, but will still be avialable in the .dist-info directory. See pylint-dev/pylint-plugin-utils#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants