Преглед на файлове

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.
David L. Jones преди 5 години
родител
ревизия
619a8262aa
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      python/setup.py

+ 1 - 1
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"))