Skip to content

Commit 16014b6

Browse files
ulopeeorituz
authored andcommitted
Fix install-dev make target with new pip versions
`pip >= 20.3` is using a new resolver that no longer accepts extras in constraints files. In the `install-dev` task we used to pass our requirements-dev.txt file verbatim as a constraints file to ensure additional local developer tools (via `requirerments-local.txt`) don't cause breakage. For now pre-process the requirements file with sed to remove extras. See: pypa/pip#9209
1 parent 4887ef0 commit 16014b6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,17 @@ install: check-pip-tools clean-pyc
104104
cd requirements; pip-sync requirements.txt _raiden.txt
105105

106106
install-dev: check-pip-tools clean-pyc osx-detect-proper-python
107-
touch requirements/requirements-local.txt
107+
# Remove extras from requirements to produce a valid constraints file.
108+
# See: https://github.com/pypa/pip/issues/9209
109+
@sed -e 's/\[[^]]*\]//g' requirements/requirements-dev.txt > requirements/constraints-dev.txt
110+
@touch requirements/requirements-local.txt
108111
cd requirements; pip-sync requirements-dev.txt _raiden-dev.txt
109-
pip install -c requirements/requirements-dev.txt -r requirements/requirements-local.txt
112+
pip install -c requirements/constraints-dev.txt -r requirements/requirements-local.txt
113+
@rm requirements/constraints-dev.txt
110114

111115
osx-detect-proper-python:
112116
ifeq ($(shell uname -s),Darwin)
113-
python -c 'import time; time.clock_gettime_ns(time.CLOCK_MONOTONIC_RAW)' > /dev/null 2>&1 || (echo "Not supported python version. Read https://raiden-network.readthedocs.io/en/latest/macos_install_guide.html#macos-development-setup for details."; exit 1)
117+
@python -c 'import time; time.clock_gettime_ns(time.CLOCK_MONOTONIC_RAW)' > /dev/null 2>&1 || (echo "Not supported python version. Read https://raiden-network.readthedocs.io/en/latest/macos_install_guide.html#macos-development-setup for details."; exit 1)
114118
endif
115119

116120
GITHUB_ACCESS_TOKEN_ARG=

0 commit comments

Comments
 (0)