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

Fix deploy error due to new pip / old setuptools conflict #145

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

johnsca
Copy link
Contributor

@johnsca johnsca commented Aug 19, 2019

Newer versions of pip (>=19.0) don't work with older versions of setuptools (<40) due to an attribute error. If include_system_packages is false (now the default), this is not an issue because of the newer setuptools that gets installed into the venv. However, when it's true, which is required for some charms, the install fails because pip somehow prefers the older system-installed setuptools over the newer one in the venv. Pinning pip avoids the problem until we can find a better solution.

See:

Newer versions of pip (>=19.0) don't work with older versions of
setuptools (<40) due to an attribute error.  If
`include_system_packages` is `false` (now the default), this is not an
issue because of the newer setuptools that gets installed into the venv.
However, when it's `true`, which is required for some charms, the
install fails because pip somehow prefers the older system-installed
setuptools over the newer one in the venv. Pinning pip avoids the
problem until we can find a better solution.

See:
  * https://discourse.jujucharms.com/t/wheel-building-fails-during-charm-deployment/1947
  * pypa/pip#6164
@johnsca
Copy link
Contributor Author

johnsca commented Aug 19, 2019

Tested with both trusty and bionic with include_system_packages set to both true and false.

Copy link
Contributor

@kwmonroe kwmonroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a stop-gap, but oof:

fails because pip somehow prefers the older system-installed setuptools over the newer one in the venv

This feels like an easy fix to accidentally clobber because future maintainers forget these roots. I'm fine enough with this being a pip 19.(0+n) issue, but let's pour one out for our future selves just in case.

@johnsca johnsca merged commit 22d76e0 into master Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants