I don't know why but when I `pip install -r requirements.txt` on Jython, it always raises a Java StackOverflowError. If I install the deps individually, it works... $ pip install -v -r dev-requirements.txt Exception: Traceback (most recent call last): File "fonttools-jy271b2/Lib/site-packages/pip/basecommand.py", line 209, in main status = self.run(options, args) File "fonttools-jy271b2/Lib/site-packages/pip/commands/install.py", line 285, in run self.populate_requirement_set( File "fonttools-jy271b2/Lib/site-packages/pip/basecommand.py", line 286, in populate_requirement_set for req in parse_requirements( File "fonttools-jy271b2/Lib/site-packages/pip/req/req_file.py", line 89, in parse_requirements for line_number, line in lines_enum: File "fonttools-jy271b2/Lib/site-packages/pip/req/req_file.py", line 323, in ignore_comments for line_number, line in lines_enum: File "fonttools-jy271b2/Lib/site-packages/pip/req/req_file.py", line 298, in join_lines if COMMENT_RE.match(line): RuntimeError: maximum recursion depth exceeded (Java StackOverflowError)
69 lines
1.9 KiB
Bash
Executable File
69 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -x
|
|
|
|
if [[ "$(uname -s)" == 'Darwin' ]]; then
|
|
# install pyenv from the git repo (quicker than using brew)
|
|
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
|
|
PYENV_ROOT="$HOME/.pyenv"
|
|
PATH="$PYENV_ROOT/bin:$PATH"
|
|
eval "$(pyenv init -)"
|
|
|
|
case "${TOXENV}" in
|
|
py27)
|
|
# install pip on the system python
|
|
curl -O https://bootstrap.pypa.io/get-pip.py
|
|
python get-pip.py --user
|
|
;;
|
|
py33)
|
|
pyenv install 3.3.6
|
|
pyenv global 3.3.6
|
|
;;
|
|
py34)
|
|
pyenv install 3.4.3
|
|
pyenv global 3.4.3
|
|
;;
|
|
py35)
|
|
pyenv install 3.5.1
|
|
pyenv global 3.5.1
|
|
;;
|
|
pypy)
|
|
pyenv install pypy-5.0.0
|
|
pyenv global pypy-5.0.0
|
|
;;
|
|
esac
|
|
pyenv rehash
|
|
python -m pip install --user --upgrade pip virtualenv
|
|
else
|
|
# on Linux, we only need pyenv to get the latest pypy and jython
|
|
if [[ "${TOXENV}" == "pypy" || "${TOXENV}" == "jython" ]]; then
|
|
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
|
|
PYENV_ROOT="$HOME/.pyenv"
|
|
PATH="$PYENV_ROOT/bin:$PATH"
|
|
eval "$(pyenv init -)"
|
|
|
|
if [[ "${TOXENV}" == "pypy" ]]; then
|
|
pyenv install pypy-5.0.0
|
|
pyenv global pypy-5.0.0
|
|
else
|
|
pyenv install jython-2.7.1b2
|
|
pyenv global jython-2.7.1b2
|
|
fi
|
|
pyenv rehash
|
|
fi
|
|
pip install --upgrade pip virtualenv
|
|
fi
|
|
|
|
# activate virtualenv and install test requirements
|
|
python -m virtualenv ~/.venv
|
|
source ~/.venv/bin/activate
|
|
|
|
if [[ "${TOXENV}" == "jython" ]]; then
|
|
# using requirements.txt with pip on Jython raises `RuntimeError:
|
|
# maximum recursion depth exceeded (Java StackOverflowError)`
|
|
pip install pytest
|
|
else
|
|
pip install -r dev-requirements.txt
|
|
fi
|