Skip to content

Commit 7415074

Browse files
committed
Correctly set working directory in setup.py
The setup.py script assumes that it is being run from the top-level project directory with all filenames being relative to that location. This may not always be the case, so we need to ensure that the working directory is correctly set no matter where the script is invoked from.
1 parent f2c885e commit 7415074

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def main():
159159
data_files=data_files)
160160

161161
if __name__ == '__main__':
162+
os.chdir(os.path.dirname(__file__))
162163
main()
163164

164165
# vim: set filetype=python sts=4 sw=4 et si :

0 commit comments

Comments
 (0)