[PATCH 1 of 2 v3] setup: import setup from setuptools if FORCE_SETUPTOOLS is set
Nathan Goldbaum
nathan12343 at gmail.com
Fri Oct 9 17:31:15 UTC 2015
# HG changeset patch
# User Nathan Goldbaum <ngoldbau at ucsc.edu>
# Date 1444411551 18000
# Fri Oct 09 12:25:51 2015 -0500
# Node ID d27f31183f4ca4af2a0a96af32a631181b501b5a
# Parent a024e2db4553492e173032f52464e2c4efe0d4fa
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
More information about the Mercurial-devel
mailing list