# HG changeset patch # User Nathan Goldbaum # Date 2015-10-09 17:25:51 # Node ID e8497889edab865818c0f91094b0ed3cd7681f34 # Parent bdd7d9c7e62609476910f24da963998c391a996c 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 diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -70,7 +70,11 @@ import re 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