Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python] Use CPython libraries over distuils
As distutils and Easy Install are deprecated c.f.: * https://setuptools.pypa.io/en/stable/deprecated/distutils-legacy.html * https://setuptools.pypa.io/en/stable/deprecated/easy_install.html it is perferable to convert use of distutils to either use existing CPython libraries or use setuptool's versions of them. This patch applies * distutils.spawn.find_executable -> shutil.which Henry Schreiner pointed out that shutil.which (added in Python 3.3) is perferable to setuptools._distutils.spawn.find_executable. This patch was meant to also change: * distutils.setup -> setuptools.setup * distutils.sysconfig -> CPython's sysconfig but it seems that these are still required given the current state of the build and will need to be revised in a later PR. The change distutils.core.Extension -> setuptools.Extension could be applied in: * bindings/python/setup_pypi.py * bindings/python/setup_standalone.py but isn't as these files are obsolete and should be removed. Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
- Loading branch information