Changed setuptools opt-in to be more explicit; added a quick explanation

This commit is contained in:
Seth House 2012-06-30 19:00:22 -07:00
parent 983ef87626
commit 6e7afc0d0e

View file

@ -11,11 +11,11 @@ import sys
from distutils.cmd import Command
from distutils.sysconfig import get_python_lib, PREFIX
# Use setuptools if available, else fallback to distutils.
# As an example, setuptools is available in virtualenvs and buildouts through
# Setuptools or Distribute.
# Use setuptools only if the user opts-in by setting the USE_SETUPTOOLS env var
# This ensures consistent behavior but allows for advanced usage with
# virtualenv, buildout, and others.
with_setuptools = False
if 'SETUPTOOLS' in os.environ:
if 'USE_SETUPTOOLS' in os.environ:
try:
from setuptools import setup
with_setuptools = True