Avoid deleting previous PYTHONPATH
Review Request #6001 — Created June 16, 2014 and submitted
With the previous putenv command, if an user had already set the PYTHONPATH environment variable, its value was deleted and substituted by os.getcwd(), which may prevent the installation if the dependencies are installed in a different path. Now, it appends this value to the previous value set in the sys.path, so the user configuration is kept.
Description | From | Last Updated |
---|---|---|
Col: 24 E211 whitespace before '(' |
reviewbot |
-
I wish I had seen this sooner. This change completely reverts the fix from https://reviews.reviewboard.org/r/5300/
The reason that it was done as a os.putenv() instead of as sys.path.append() is because the subprocess doesn't inherit this value. By changing this, you reintroduced the original issue.
The correct fix here would be to append to the PYTHONPATH environment variable instead of replacing it. I'll submit a new patch to fix this.