setup: import setup from setuptools if FORCE_SETUPTOOLS is set
authorNathan Goldbaum <ngoldbau@ucsc.edu>
Fri, 09 Oct 2015 12:25:51 -0500
changeset 26600 e8497889edab
parent 26599 bdd7d9c7e626
child 26601 c5c7c686d6a6
setup: import setup from setuptools if FORCE_SETUPTOOLS is set This should allow easier experimentation with using setuptools in mercurial's build automation, without breaking anything that currently depends on distutils behavior
setup.py
--- a/setup.py	Mon Oct 12 14:46:51 2015 +0100
+++ b/setup.py	Fri Oct 09 12:25:51 2015 -0500
@@ -70,7 +70,11 @@
 import shutil
 import tempfile
 from distutils import log
-from distutils.core import setup, Command, Extension
+if 'FORCE_SETUPTOOLS' in os.environ:
+    from setuptools import setup
+else:
+    from distutils.core import setup
+from distutils.core import Command, Extension
 from distutils.dist import Distribution
 from distutils.command.build import build
 from distutils.command.build_ext import build_ext