Commit 87fa57fe authored by Charles Ferguson's avatar Charles Ferguson
Browse files

Only include directories in the python path which exist.

For some reason the zip file was appearing at the front of the list
for the paths - we can omit anything that's not a directory.
parent 2c557c7f
......@@ -349,8 +349,9 @@ fi
# Apply any site customization that may have been configured.
pythonlib="$(python -c "import sys ; \
print([path for path in sys.path if '$(basename "$environment")/lib' in path][0])"
pythonlib="$(python -c "import sys ; import os.path ;\
print([path for path in sys.path if '$(basename "$environment")/lib' in path \
and os.path.isdir(path)][0])"
if [[ "${pythonlib}" != '' ]] ; then
if [[ "${sitecustomize}" != '' ]] ; then
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment