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

Installing installs the tests package #456

Closed
hellerve opened this issue May 9, 2019 · 3 comments · Fixed by #458 or #902
Closed

Installing installs the tests package #456

hellerve opened this issue May 9, 2019 · 3 comments · Fixed by #458 or #902
Labels

Comments

@hellerve
Copy link
Contributor

hellerve commented May 9, 2019

Because setup.py uses find_packages and tests is on the top-level, pip install datasette will install a top-level package called tests, which is probably not desired behavior.

The offending line is here:

packages=find_packages(),

And only pip uninstall datasette with a conflicting package would warn you by default; apparently another package had the same problem, which is why I get this message when uninstalling:

$ pip uninstall datasette
Uninstalling datasette-0.27:
  Would remove:
    /usr/local/bin/datasette
    /usr/local/lib/python3.7/site-packages/datasette-0.27.dist-info/*
    /usr/local/lib/python3.7/site-packages/datasette/*
    /usr/local/lib/python3.7/site-packages/tests/*
  Would not remove (might be manually added):
    [ .. snip .. ]
Proceed (y/n)? 

This should be a relatively simple fix, and I could drop a PR if desired!

Cheers

@simonw
Copy link
Owner

simonw commented May 9, 2019

Thanks for spotting this! Pull request would be very welcome.

@abeyerpath
Copy link
Contributor

Bumping this, as the previous fix is passing the wrong type, and not actually addressing the issue...

The exclude argument needs an iterable of packages instead of a single string (but since str is iterable, it's currently excluding packages t, e, and s.)

@simonw
Copy link
Owner

simonw commented Jul 24, 2020

Yes this is still a bug!

@simonw simonw reopened this Jul 24, 2020
simonw pushed a commit that referenced this issue Jul 24, 2020
The `exclude` argument to `find_packages` needs an iterable of package
names.

Closes #456 - thanks, @abeyerpath!
simonw added a commit that referenced this issue Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants