changeset 26600:e8497889edab

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
author Nathan Goldbaum <ngoldbau@ucsc.edu>
date Fri, 09 Oct 2015 12:25:51 -0500
parents bdd7d9c7e626
children c5c7c686d6a6
files setup.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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