Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

setup.py fixes #79

Merged
merged 3 commits into from
Apr 16, 2020
Merged

setup.py fixes #79

merged 3 commits into from
Apr 16, 2020

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Mar 3, 2020

  • remove broken distutils compatibility code
  • stop installing tests
  • make setup.py +x

mgorny added 3 commits March 3, 2020 07:28
The distutils compat might be meaningful if the code did not
unconditionally call find_packages() (which is undefined in that
branch).  That said, there's probably no reason whatever why this
package would need such compat (i.e. be installed before setuptools),
so let's just drop it.
Add a missing exclude to find_packages() in order to stop it from
installing global-scope 'tests' package.

Fixes readthedocs#64
Make setup.py executable so that it can be executed directly.  This
is not strictly necessary but it's convenient.
package_dir={'': '.'},
packages=find_packages('.'),
packages=find_packages('.', exclude=['tests']),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this, but I think some distributions run the tests after installing a package, so they expect them to be included

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distributions usually run tests before building the package. According to my testing, setup.py sdist still includes them in the tarball. If you want them to be usable after installing the package, they need to be moved inside the package. Installing a global scope tests package is a very bad idea, and guaranteed to cause problems when done by more than one package.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me, I also saw #60

Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ericholscher ericholscher merged commit a63c1e0 into readthedocs:master Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants