Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Pin setuptools to <45 to allow installing pipenv on python 2.7#376

Merged
Benaiah merged 1 commit intoxenialfrom
pin-setuptools-for-pipenv-to-fix-ci-failures
Feb 28, 2020
Merged

Pin setuptools to <45 to allow installing pipenv on python 2.7#376
Benaiah merged 1 commit intoxenialfrom
pin-setuptools-for-pipenv-to-fix-ci-failures

Conversation

@Benaiah
Copy link
Copy Markdown
Contributor

@Benaiah Benaiah commented Feb 27, 2020

Fixes CI failures currently affecting any build-image PRs.

Fixes CI failures currently affecting any build-image PRs.
@vbrown608
Copy link
Copy Markdown
Contributor

I'm not very familiar with the python ecosystem - could you explain what you understood the error to be and why this fixes it?

@Benaiah
Copy link
Copy Markdown
Contributor Author

Benaiah commented Feb 28, 2020

pypa/virtualenv#1493 is the underlying issue that this is taking care of. I'm not a Python expert either, but as I understand it pipenv depends on virtualenv, which in turn requires setuptools. setuptools recently released a new version 45.0.0 which drops support for Python 2. This causes the build to fail because pipenv ends up installing setuptools>=45, which raises an error if installed on Python 2. By explicitly installing a version of setuptools that supports Python 2, we avoid the build failure that occurs on the next line.

I'm not sure why pip is installing a version of setuptools that doesn't support the running version of Python.

@Benaiah
Copy link
Copy Markdown
Contributor Author

Benaiah commented Feb 28, 2020

https://jenkins.ops.netlify.com/blue/organizations/jenkins/build-image/detail/PR-373/1/pipeline is an example of a CI build that failed because of this issue instead of an issue with the PR itself.

Copy link
Copy Markdown
Contributor

@vbrown608 vbrown608 left a comment

Choose a reason for hiding this comment

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

Thanks for explaining, this seems reasonable. My read of the thread is that maybe some mirror for installing Python packages is not respecting the requirement that virtualenv should use setuptools <45.0.0 with Python 2.7, in which case we won't need this forever.

@vbrown608
Copy link
Copy Markdown
Contributor

Thanks for tracking this down!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants