Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Use pip==20.0.2 to match core st2 pin #687

Merged
merged 5 commits into from
Mar 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/st2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ endif

ifeq ($(DEB_DISTRO),bionic)
PYTHON_BINARY := /usr/bin/python3
PIP_BINARY := pip
PIP_BINARY := /usr/local/bin/pip3.6
else ifeq ($(DEB_DISTRO),xenial)
PYTHON_BINARY := /usr/bin/python3.6
PIP_BINARY := /usr/local/bin/pip3.6
Expand Down
3 changes: 2 additions & 1 deletion packages/st2/component.makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif

ifeq ($(DEB_DISTRO),bionic)
PYTHON_BINARY := /usr/bin/python3
PIP_BINARY := /usr/bin/pip3
PIP_BINARY := /usr/local/bin/pip3.6
else ifeq ($(DEB_DISTRO),xenial)
PYTHON_BINARY := /usr/bin/python3.6
PIP_BINARY := /usr/local/bin/pip3.6
Expand Down Expand Up @@ -54,6 +54,7 @@ info:
@echo "PIP_BINARY=$(PIP_BINARY)"
@echo "EL_VERSION=$(EL_VERSION)"
@echo "EL_DISTRO=$(EL_DISTRO)"
$(PIP_BINARY) --version

.PHONY: populate_version requirements wheelhouse bdist_wheel
all: info populate_version requirements bdist_wheel
Expand Down
5 changes: 4 additions & 1 deletion packages/st2/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ endif
%:
# Use Python 3 binary on Ubuntu Bionic
ifeq ($(DEB_DISTRO),bionic)
dh $@ --with python-virtualenv --python /usr/bin/python3
dh $@ --with python-virtualenv --python /usr/bin/python3.6
else ifeq ($(DEB_DISTRO),xenial)
dh $@ --with python-virtualenv --python /usr/bin/python3.6
endif
Expand Down Expand Up @@ -67,7 +67,10 @@ 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' \
--extra-pip-arg '--find-links=$(WHEELDIR)' \
--extra-pip-arg '--no-index' --no-test

Expand Down
1 change: 1 addition & 0 deletions rake/build/package_st2.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace :package do
with opts.env do
opts.components.each do |component|
within ::File.join(opts.gitdir, component) do
make :info, label: "make info"
make :bdist_wheel, label: "bdist: #{component}"
end
end
Expand Down
3 changes: 2 additions & 1 deletion rpmspec/package_venv.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
%define venv_bin %{venv_dir}/bin

%define venv_python %{venv_bin}/python3
%define pin_pip %{venv_python} %{venv_bin}/pip3 install pip==19.1.1
# 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 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
Expand Down