소스 검색

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