Commit db590baf authored by Paul Ganssle's avatar Paul Ganssle

Use absolute path in build_meta_legacy

Using the absolute path to the directory of the setup script better
mimics the semantics of a direct invocation of python setup.py.
parent 49d17725
......@@ -28,10 +28,11 @@ class _BuildMetaLegacyBackend(_BuildMetaBackend):
# '' into sys.path. (pypa/setuptools#1642)
sys_path = list(sys.path) # Save the original path
try:
if '' not in sys.path:
sys.path.insert(0, '')
script_dir = os.path.dirname(os.path.abspath(setup_script))
if script_dir not in sys.path:
sys.path.insert(0, script_dir)
try:
super(_BuildMetaLegacyBackend,
self).run_setup(setup_script=setup_script)
finally:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment