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

Upgrade venv and pip #684

Merged
merged 9 commits into from
Mar 16, 2021
Merged

Upgrade venv and pip #684

merged 9 commits into from
Mar 16, 2021

Conversation

amanda11
Copy link
Contributor

Updates to use pip 20.3.4. Using its legacy-resolver option.

@amanda11 amanda11 added this to the 3.4.0 milestone Jan 28, 2021
@amanda11
Copy link
Contributor Author

amanda11 commented Feb 1, 2021

Packages are find on EL7 and EL8.
Problems building on Xenial. The --no-site-packages option is being added to the virtualenv call, and this is not supported in virtualenv >=20.0.
It should be controllable by setting DH_VIRTUALENV_ARGUMENTS to "", so that it doesn't set it to --no-site-packages which is the default.
But spotify/dh-virtualenv@795e1a9 shows that it was being hardcoded unless system-packages option was being set. This commit is not in our fork of dh-virtualenv.

@amanda11
Copy link
Contributor Author

The --no-site-packages was fixed by @blag create a new branch of dh-virtualenv that didn't set it.

This then led to problems whereby /opt/stackstorm/st2/bin/python was a sym link to /usr/bin/python. So the pack install hubot failed, as the path to the executables was found from the python sys.executalbe, which when sym linked meant it looked for files in /usr/bin instead of /opt/stackstorm/st2/bin.

Using the --copies virtualenv option fixes this. Verified on U18. Will push commit up once U16 test finished.

@amanda11 amanda11 modified the milestones: 3.4.0, 3.5.0 Feb 12, 2021
@amanda11 amanda11 changed the title [WIP] Upgrade venv and pip Upgrade venv and pip Feb 12, 2021
@amanda11 amanda11 marked this pull request as ready for review February 12, 2021 15:31
@amanda11 amanda11 marked this pull request as draft March 11, 2021 13:11
@amanda11 amanda11 marked this pull request as ready for review March 12, 2021 12:13
@amanda11
Copy link
Contributor Author

NB. The packages relies on the PR StackStorm/st2packaging-dockerfiles#98, so anticipate failures until the relevant st2packaging-dockerfiles change is merged.

@amanda11
Copy link
Contributor Author

st2packaging-dockerfiles PR now merged. Just waiting for the new dockerfiles to be uploaded to https://hub.docker.com/r/stackstorm/packagingbuild/tags?page=1&ordering=last_updated, and then will reset off the circleCI.

@amanda11
Copy link
Contributor Author

amanda11 commented Mar 16, 2021

This will fail until we get the StackStorm/st2#5123 fix in, as we need the change to fixate-requirements.py. But equally if we just take that PR we then get problems as we get pip and virtualenv problems. So these two PRs need to go in together.

@Kami Kami merged commit 6e66733 into master Mar 16, 2021
@Kami Kami deleted the upgrade_venv branch March 16, 2021 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants