Skip to content
Myr

Stop falling back to distutils in setup.py

Before adoption: this commit came in with the history the project adopted, so no landing records it.

distutils has been deprecated for years now and pip is refusing to install projects using it. As such, *some* users are reporting problems installing requests. Let's avoid this entirely by not falling back to distutils at all.

authored by Ian Cordasco · committed by Ian Cordasco · parent 6592dbc · Browse files · 1 file+2 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−4 removed

  • other:+2 added−4 removed

1 file+2 added−4 removed

modified:setup.py+2 added-4 removed
4 unmodified lines
5import sys67from codecs import open89try:10 from setuptools import setup9from setuptools import setup11except ImportError:12 from distutils.core import setup101112if sys.argv[-1] == 'publish':13 os.system('python setup.py sdist upload')14 sys.exit()15
57 unmodified lines