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

Drop legacy distutils fallback in setup.py #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Drop legacy distutils fallback in setup.py #115

wants to merge 1 commit into from

Conversation

jdufresne
Copy link
Contributor

distutils is not recommended for use and unnecessary for modern Python
environments. Use only setuptools instead. From
https://docs.python.org/3/library/distutils.html:

Most Python users will not want to use this module directly, but
instead use the cross-version tools maintained by the Python Packaging
Authority. In particular, setuptools is an enhanced alternative to
distutils ...

The recommended pip installer runs all setup.py scripts with
setuptools, even if the script itself only imports distutils. Refer to
the Python Packaging User Guide for more information.

@GhostofGoes
Copy link

Looks like it's "vendored" now in setuptools, so this seems safe to drop.

@McSinyx
Copy link

McSinyx commented Nov 25, 2018

I don't agree: on many GNU/Linux distros, setuptools is separately packaged from Python and pip, thus if we take this approach, while appdirs is still installable by pip, local setup.py might not run.

@jdufresne
Copy link
Contributor Author

Is that really an issue in practice? In my experience:

  1. The default system Python has setuptools installed by default
  2. Linux users use their system package manager to install system libraries
  3. Linux users use a virtualenv with pip to install packages for local testing

@pradyunsg
Copy link

Nudging on this PR for merge.

distutils is not recommended for use and unnecessary for modern Python
environments. Use only setuptools instead. From
https://docs.python.org/3/library/distutils.html:

> Most Python users will not want to use this module directly, but
> instead use the cross-version tools maintained by the Python Packaging
> Authority. In particular, setuptools is an enhanced alternative to
> distutils ...
>
> The recommended pip installer runs all setup.py scripts with
> setuptools, even if the script itself only imports distutils. Refer to
> the Python Packaging User Guide for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants