asyncmy
asyncmy copied to clipboard
Doc/license files installed directly in site-packages
The asyncmy
package installs its CHANGELOG.md
, LICENSE
, and README.md
directly into site-packages
.
$ python3 -m venv _e
$ . _e/bin/activate
(_e) $ pip install asyncmy
(_e) $ ls -l _e/lib64/python3.10/site-packages/
total 28
drwxrwxr-x. 1 ben ben 1052 Jan 14 16:44 asyncmy
drwxrwxr-x. 1 ben ben 88 Jan 14 16:44 asyncmy-0.2.3.dist-info
-rw-rw-r--. 1 ben ben 851 Jan 14 16:44 CHANGELOG.md
drwxrwxr-x. 1 ben ben 66 Jan 14 16:43 _distutils_hack
-rw-rw-r--. 1 ben ben 152 Jan 14 16:43 distutils-precedence.pth
-rw-rw-r--. 1 ben ben 11357 Jan 14 16:44 LICENSE
drwxrwxr-x. 1 ben ben 114 Jan 14 16:43 pip
drwxrwxr-x. 1 ben ben 154 Jan 14 16:43 pip-21.2.3.dist-info
drwxrwxr-x. 1 ben ben 80 Jan 14 16:43 pkg_resources
-rw-rw-r--. 1 ben ben 4930 Jan 14 16:44 README.md
drwxrwxr-x. 1 ben ben 714 Jan 14 16:43 setuptools
drwxrwxr-x. 1 ben ben 146 Jan 14 16:43 setuptools-57.4.0.dist-info
What's the trouble?
The top-level site-packages
directory isn’t specific to asyncmy
, so it’s a confusing place to install documentation, and there will be conflicts with other packages that do the same thing (usually by accident).
This is relatively harmless when pip-installing into a virtualenv, as any packages that do this will just keep overwriting each other’s files. Still, files that are distribu ted and then overwritten aren’t doing any good. For Linux distribution packaging, it’s necessary for the packager to work around this behavior to avoid conflicts in the system site-packages.
For these reasons, normally it would make sense to let Poetry automatically include the LICENSE
file in the .dist-info
, and let the other files be sdist only. That would look like:
include = [
{ path = "CHANGELOG.md", format = "sdist" },
{ path = "README.md", format = "sdist" },
]
You certainly don’t have to change it if you don’t want to, though.
Would you consider a PR for this?