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

shell-gpt tests/*.py get installed to site-packages/tests - intentional or bug? #135

Closed
jhgit opened this issue Apr 2, 2023 · 5 comments · Fixed by #94 or #165
Closed

shell-gpt tests/*.py get installed to site-packages/tests - intentional or bug? #135

jhgit opened this issue Apr 2, 2023 · 5 comments · Fixed by #94 or #165
Labels
bug Something isn't working refactoring Make it great again

Comments

@jhgit
Copy link

jhgit commented Apr 2, 2023

The current setup.py uses find_packages(). In the current git repo, this finds tests as a package, and so includes tests as part of the bdist.

This winds up installing tests/*.py into /lib/pythonX.Y/site-packages/tests. Is this intentional that it installs tests specific to shell-gpt into a generically named 'tests' directory in site-packages?

Perhaps the bdist should not include the tests/*.py files?

@jhgit
Copy link
Author

jhgit commented Apr 2, 2023

See also discussion in a downstream packager - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270542

Note that installing to site-packages/tests/ creates a real life conflict with another package - https://github.com/greenbone/notus-scanner

It is possible the notus-scanner package is also mistaken in installing its test files to site-packages/tests as well.

@TheR1D TheR1D added bug Something isn't working refactoring Make it great again labels Apr 2, 2023
@TheR1D
Copy link
Owner

TheR1D commented Apr 3, 2023

@jhgit Thank you for reporting this issue. Should be fixed in the lates release 0.8.3. Could you please confirm it?

@TheR1D TheR1D linked a pull request Apr 3, 2023 that will close this issue
@jhgit
Copy link
Author

jhgit commented Apr 3, 2023

After removing tests/__init__.py, find_packages() no longer sees 'tests', so the tests are no longer in the sdist tarball. I would say it's fine if they are not in the bdist, but sdist users might want to have the tests.

@jhgit
Copy link
Author

jhgit commented Apr 3, 2023

I think using MANIFEST.in would do the job to get tests in the sdist (and not the bdist):

$ cat MANIFEST.in
graft tests

@TheR1D TheR1D linked a pull request Apr 14, 2023 that will close this issue
7 tasks
@TheR1D
Copy link
Owner

TheR1D commented Apr 14, 2023

@jhgit Thank you, shoud be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactoring Make it great again
Projects
None yet
2 participants