mirror of
https://github.com/corda/corda.git
synced 2025-02-21 09:51:57 +00:00
Make virtualenv installable if the checkout path has whitespace. (#1187)
This commit is contained in:
parent
2829faa01f
commit
adc33273f6
@ -7,11 +7,15 @@ set -xeo pipefail
|
|||||||
# Install the virtualenv
|
# Install the virtualenv
|
||||||
if [ ! -d "virtualenv" ]
|
if [ ! -d "virtualenv" ]
|
||||||
then
|
then
|
||||||
|
# If the canonical working directory contains whitespace, virtualenv installs broken scripts.
|
||||||
|
# But if we pass in an absolute path that uses symlinks to avoid whitespace, that fixes the problem.
|
||||||
|
# If you run this script manually (not via gradle) from such a path alias, it's available in PWD:
|
||||||
|
absolutevirtualenv="$PWD/virtualenv"
|
||||||
# Check if python2.7 is installed explicitly otherwise fall back to the default python
|
# Check if python2.7 is installed explicitly otherwise fall back to the default python
|
||||||
if type "python2.7" > /dev/null; then
|
if type "python2.7" > /dev/null; then
|
||||||
virtualenv -p python2.7 virtualenv
|
virtualenv -p python2.7 "$absolutevirtualenv"
|
||||||
else
|
else
|
||||||
virtualenv virtualenv
|
virtualenv "$absolutevirtualenv"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -29,4 +33,4 @@ if [ ! -d "virtualenv/lib/python2.7/site-packages/sphinx" ]
|
|||||||
then
|
then
|
||||||
echo "Installing pip dependencies ... "
|
echo "Installing pip dependencies ... "
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user