From 21e691f113df73aad2262c11556be43252294778 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Thu, 12 Dec 2019 16:41:57 +0100 Subject: [PATCH] bootstrap: use separate requirements file for py3 Because pip-compile produces different set of packages for different python versions it needs to have a dedicated requirements.txt for py2 and py3. Signed-off-by: Kyr Shatskyy --- bootstrap | 6 +++++- requirements.txt => requirements2.txt | 0 2 files changed, 5 insertions(+), 1 deletion(-) rename requirements.txt => requirements2.txt (100%) diff --git a/bootstrap b/bootstrap index 65a932ae75..d2cb94265c 100755 --- a/bootstrap +++ b/bootstrap @@ -133,6 +133,10 @@ if [ -z "$NO_CLOBBER" ] || [ ! -e ./$VENV ]; then virtualenv --python=$PYTHON --setuptools $VENV fi +PVER=$(./$VENV/bin/python --version 2>&1 | grep Python) +LVER=${PVER#* } +SVER=${LVER%%.*} + # Upgrade pip first ./$VENV/bin/pip install --upgrade pip @@ -140,7 +144,7 @@ fi ./$VENV/bin/pip install setuptools --upgrade # Install all requirements -./$VENV/bin/pip install --upgrade -r requirements.txt +./$VENV/bin/pip install --upgrade -r requirements${SVER}.txt # Check to make sure requirements are met ./$VENV/bin/pip check diff --git a/requirements.txt b/requirements2.txt similarity index 100% rename from requirements.txt rename to requirements2.txt -- 2.39.5