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

Don't install unittest code by default #1027

Closed
priv-kweihmann opened this issue Jul 7, 2020 · 2 comments · Fixed by #1028
Closed

Don't install unittest code by default #1027

priv-kweihmann opened this issue Jul 7, 2020 · 2 comments · Fixed by #1028

Comments

@priv-kweihmann
Copy link
Contributor

When doing python3 setup.py install on a local checkout of the code, files from git/test will be installed into the standard site-packages directory.
This mean that theoretically even the requirements from test-requirements.txt are mandatory for the base package and secondly it isn't necessary as the chances that an user is actually using the test code are pretty low.
So overall it doesn't make much sense to me.

Is there any way to avoid having the test files installed via setuptools?

@Byron
Copy link
Member

Byron commented Jul 7, 2020

Thanks for bringing this up! I agree with the sentiment and believe it would be preferable not to package and install test files.

Maybe these can be excluded during packaging? Help is greatly appreciated, as I only remember the incredible pain that setup.py inflicted on me.

@priv-kweihmann
Copy link
Contributor Author

I'm pretty sure that this is possible - I think it requires just some magic in setup.py and the MANIFEST.in.
BTW I think the tests itself should be in the root directory rather than a subdir of the module itself - is there a reason for them being placed where they are right now?

I'll see if I could come up with a PR for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants