Use URL-encoded PIP_FIND_LINKS to support spaces in paths
This commit is contained in:
@ -12,8 +12,7 @@ It does so by
|
||||
|
||||
As of April 2021, all of these downloads make up around 600MB. By
|
||||
default, it will download everything into $HOME/.cache/lammps, but this can be
|
||||
changed with the ``LAMMPS_CACHING_DIR`` environment variable. Note that due to
|
||||
a limitation in pip, the ``LAMMPS_CACHING_DIR`` can not contain spaces.
|
||||
changed with the ``LAMMPS_CACHING_DIR`` environment variable.
|
||||
|
||||
Once the caches have been initialized, they can be used for building
|
||||
LAMMPS documentation or compiling using CMake on an offline system.
|
||||
|
||||
@ -7,8 +7,10 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
URL_ENCODED_PATH="$(python3 -c "import urllib.parse; print(urllib.parse.quote(input()))" <<< "$PIP_CACHE_DIR")"
|
||||
|
||||
export PIP_NO_INDEX=1
|
||||
export PIP_FIND_LINKS="$PIP_CACHE_DIR"
|
||||
export PIP_FIND_LINKS="file://$URL_ENCODED_PATH"
|
||||
|
||||
echo "Disabling pip index and use local cache directory..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user