LICENSE file installed under /usr/lib/python*/site-packages/LICENSE
asarubbo opened this issue · 3 comments
Hello,
while try to packaging telegram-text
for Gentoo Linux, I noticed an errors that comes from our package manager:
>>> Install dev-python/telegram-text-0.1.1 into /tmp/portage/dev-python/telegram-text-0.1.1/image
* python3_10: running distutils-r1_run_phase distutils-r1_python_install
* The following unexpected files/directories were found top-level
* in the site-packages directory:
*
* /usr/lib/python3.10/site-packages/LICENSE
*
* This is most likely a bug in the build system. More information
* can be found in the Python Guide:
* https://projects.gentoo.org/python/guide/qawarn.html#stray-top-level-files-in-site-packages
* ERROR: dev-python/telegram-text-0.1.1::x-portage failed (install phase):
* Failing install because of stray top-level files in site-packages
So atm it would install the LICENSE
file as /usr/lib/python3.10/site-packages/LICENSE
and it is certainly wrong.
Hi!
Please provide more instructions of how did you install the package, package manager and virtualenv package that you used, and additional system information such as Linux distributive, version, and CPU architecture to reproduce the error
Thank you
Hello, as said the issue was discovered during the packaging on Gentoo Linux, because our package manager warns about common errors.
In any case you can see the issue also while installing the package via pip install telegram-text
it installs the LICENSE file as /usr/local/lib/python3.9/site-packages/LICENSE
and as /usr/local/lib/python3.9/site-packages/LICENSE
~ # find /usr/local/ -name LICENSE
/usr/local/lib/python3.9/site-packages/telegram_text-0.1.1.dist-info/LICENSE
/usr/local/lib/python3.9/site-packages/LICENSE
~ # diff -ru /usr/local/lib/python3.9/site-packages/telegram_text-0.1.1.dist-info/LICENSE /usr/local/lib/python3.9/site-packages/LICENSE
~ #
So the directory site-packages
is supposed to contain directories of the python modules instead of strya files like LICENSE.
Hope it is clear now.