From e37da07241e34af317e5fdd7d5286261b57a812d Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 30 Dec 2012 17:55:23 +0000 Subject: [PATCH] Allow running `setup.py` from any directory. --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index ec4fafe4bdd..97b4f7cabd5 100755 --- a/setup.py +++ b/setup.py @@ -12,6 +12,9 @@ from distutils.cmd import Command 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__)) + # 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.