From 619a8262aa44a2436da9db20bb454b9407715ed5 Mon Sep 17 00:00:00 2001 From: "David L. Jones" Date: Fri, 6 Mar 2020 16:22:26 -0800 Subject: [PATCH] Make sure setup.py has a valid path. In some invocation patterns, `os.path.dirname(__file__)` may not return a valid value. This change defaults to os.curdir in that case. --- python/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/setup.py b/python/setup.py index d478858525..327658a484 100755 --- a/python/setup.py +++ b/python/setup.py @@ -20,7 +20,7 @@ from distutils.command.clean import clean as _clean from distutils.spawn import find_executable -current_dir = os.path.dirname(__file__) +current_dir = (os.path.dirname(__file__) or os.curdir) current_dir_relative = os.path.relpath(current_dir) src_dir = os.path.abspath(os.path.join(current_dir, "..", "src")) vsprojects_dir = os.path.abspath(os.path.join(current_dir, "..", "vsprojects"))