pylint-dev / pylint-plugin-utils

Utilities and helpers for writing Pylint plugins
GNU General Public License v2.0
24 stars 12 forks source link

Do not pollute site-packages #29

Closed moubctez closed 1 year ago

moubctez commented 1 year ago

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 commented 1 year ago

Hmm, this appears to be an unintended side effect of using poetry that I did not know about: https://github.com/python-poetry/poetry/issues/2015#issuecomment-1133467892

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 commented 1 year ago

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 commented 1 year ago

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.