From 8adb92be294a10dbdb5cfd374420d74621c57b8f Mon Sep 17 00:00:00 2001 From: Aloys Augustin Date: Tue, 23 Jul 2019 15:19:28 +0200 Subject: tests: pin pip version New pip releases can break pip-tools. This commit pins the version of pip used in the test virtualenv to prevent uncontrolled breakage. This fixes the current issue in make test: TypeError: __init__() got an unexpected keyword argument 'index_urls' Change-Id: I3b7ecb31e651401ada0d357e2bf093c91c934565 Type: feature Signed-off-by: Aloys Augustin --- test/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/Makefile b/test/Makefile index e2823ee103e..8a6d69c3a62 100644 --- a/test/Makefile +++ b/test/Makefile @@ -80,6 +80,7 @@ PYTHON_INTERP=$(PYTHON) endif PYTHON_VERSION=$(shell $(PYTHON_INTERP) -c 'import sys; print(sys.version_info.major)') +PIP_VERSION=19.1.1 PIP_TOOLS_VERSION=3.8.0 # Keep in sync with requirements.txt PYTHON_DEPENDS=requirements-$(PYTHON_VERSION).txt SCAPY_SOURCE=$(shell find $(VENV_PATH)/lib/$(PYTHON_INTERP) -name site-packages) @@ -96,6 +97,9 @@ $(PIP_TOOLS_INSTALL_DONE): @rm -rf $(VENV_PATH) @mkdir -p $(TEST_RUN_DIR) @virtualenv $(VENV_PATH) -p $(PYTHON_INTERP) + # pip version pinning + @bash -c "source $(VENV_PATH)/bin/activate && \ + $(PYTHON_INTERP) -m pip install pip===$(PIP_VERSION)" @bash -c "source $(VENV_PATH)/bin/activate && \ $(PYTHON_INTERP) -m pip install pip-tools===$(PIP_TOOLS_VERSION)" @touch $@ -- cgit 1.2.3-korg