diff --git a/packages/st2/Makefile b/packages/st2/Makefile index c51cd396..2870c2cc 100644 --- a/packages/st2/Makefile +++ b/packages/st2/Makefile @@ -130,8 +130,8 @@ wheelhouse: .build-runners .stamp-wheelhouse .stamp-wheelhouse: | populate_version requirements inject-deps cat requirements.txt # Try to install wheels 2x in case the first one fails - $(PIP_BINARY) wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt || \ - $(PIP_BINARY) wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt + $(PIP_BINARY) --use-deprecated=legacy-resolver wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt || \ + $(PIP_BINARY) --use-deprecated=legacy-resolver wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt touch $@ .build-runners: diff --git a/packages/st2/component.makefile b/packages/st2/component.makefile index 7b918003..f6675ee3 100644 --- a/packages/st2/component.makefile +++ b/packages/st2/component.makefile @@ -75,8 +75,8 @@ wheelhouse: .stamp-wheelhouse # Install wheels into shared location cat requirements.txt # Try to install wheels 2x in case the first one fails - $(PIP_BINARY) wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt || \ - $(PIP_BINARY) wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt + $(PIP_BINARY) --use-deprecated=legacy-resolver wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt || \ + $(PIP_BINARY) --use-deprecated=legacy-resolver wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt touch $@ bdist_wheel: .stamp-bdist_wheel diff --git a/packages/st2/debian/rules b/packages/st2/debian/rules index bcaf0476..2ae29880 100755 --- a/packages/st2/debian/rules +++ b/packages/st2/debian/rules @@ -11,6 +11,7 @@ PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin WHEELDIR ?= /tmp/wheelhouse DH_VIRTUALENV_INSTALL_ROOT := /opt/stackstorm export DH_VIRTUALENV_INSTALL_ROOT +PIP_VERSION = 20.3.3 IS_SYSTEMD = $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo true) DEB_DISTRO := $(shell lsb_release -cs) @@ -67,10 +68,11 @@ override_dh_virtualenv: # # NB! Use '--no-download' arg for 'virtualenv' is required, # otherwise it downloads latest PIP version instead of bundled/pinned one. - # --force-pip-version is needed to ensure correct pip version is installed - # inside dh virtualenv - dh_virtualenv --extra-virtualenv-arg='--no-download' \ - --force-pip-version='20.0.2' \ + # NB! Use '--copies' else /opt/stackstorm/st2/bin/python is symlink to + # /usr/bin/pythonx rather than copy - and this breaks pack install + # which follows the path to calculate the location of the bin directory + dh_virtualenv --extra-virtualenv-arg='--copies' --extra-virtualenv-arg='--no-download' \ + '--upgrade-pip-to=$(PIP_VERSION)' \ --extra-pip-arg '--find-links=$(WHEELDIR)' \ --extra-pip-arg '--no-index' --no-test diff --git a/rpmspec/package_venv.spec b/rpmspec/package_venv.spec index f25fa05f..5f5fce67 100644 --- a/rpmspec/package_venv.spec +++ b/rpmspec/package_venv.spec @@ -9,7 +9,7 @@ %define venv_python %{venv_bin}/python3 # https://github.com/StackStorm/st2/wiki/Where-all-to-update-pip-and-or-virtualenv -%define pin_pip %{venv_python} %{venv_bin}/pip3 install pip==20.0.2 +%define pin_pip %{venv_python} %{venv_bin}/pip3 install pip==20.3.3 %define install_venvctrl python3 -m pip install venvctrl %if 0%{?rhel} == 8 %define install_crypto %{venv_python} %{venv_bin}/pip install cryptography==2.8 --no-binary cryptography @@ -28,7 +28,7 @@ virtualenv-3 -p python3 --no-download %{venv_dir} \ %{pin_pip} \ %{install_crypto} \ - %{venv_pip} -r requirements.txt \ + %{venv_pip} --use-deprecated=legacy-resolver -r requirements.txt \ %{venv_pip} . \ %{install_venvctrl} \ venvctrl-relocate --source=%{venv_dir} --destination=/%{venv_install_dir} \