Only change to setup.py if not already there.

This commit is contained in:
Pedro Algarvio 2012-12-30 18:03:02 +00:00
parent e37da07241
commit 3363c43495

View file

@ -13,7 +13,9 @@ from distutils.command.clean import clean
from distutils.sysconfig import get_python_lib, PREFIX
# Change to salt source's directory prior to running any command
os.chdir(os.path.dirname(__file__))
setup_dirname = os.path.dirname(__file__)
if setup_dirname != '':
os.chdir(setup_dirname)
# 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