Skip to content

Commit

Permalink
Make sure setup.py has a valid path.
Browse files Browse the repository at this point in the history
In some invocation patterns, `os.path.dirname(__file__)` may not return a valid
value. This change defaults to os.curdir in that case.
  • Loading branch information
dlj-NaN authored and acozzette committed Mar 7, 2020
1 parent 723a85f commit 619a826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
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"))
Expand Down

0 comments on commit 619a826

Please sign in to comment.