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.
This commit is contained in:
David L. Jones 2020-03-06 16:22:26 -08:00 committed by Adam Cozzette
parent 723a85f797
commit 619a8262aa

View File

@ -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"))