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

PEP 517 Compliant git repos as dependencies, with pipenv, fail install (outdated pip) #979

Closed
peterhadlaw opened this issue May 21, 2020 · 4 comments · Fixed by #1169
Closed

Comments

@peterhadlaw
Copy link

Our team uses pipenv and up until now it has been working just fine. We now have to import a private git repository that uses poetry internally and thus does not have a setup.py defined.

I saw in Heroku's blog that pip has been upgrade to 20 but is there any process to upgrade the pipenv pathway's version of pip as well?

pip >19 supports this, but the version of pip for pipenv environments is still back at 9.0.2

python-poetry/poetry#321
and
pypa/pip#5407

-----> Python app detected
-----> Found python-3.6.8, removing
cp: cannot stat '/tmp/build_522b38a153eaf1b98bf6d13aae484a8f/requirements.txt': No such file or directory
-----> Installing python-3.6.10
-----> Installing pip
-----> Installing dependencies with Pipenv 2018.5.18…
       Installing dependencies from Pipfile.lock (bea114)…
       Ignoring appnope: markers 'platform_system == "Darwin"' don't match your environment
       You are using pip version 9.0.2, however version 20.1.1 is available.
       You should consider upgrading via the 'pip install --upgrade pip' command.
       An error occurred while installing git+ssh://[email protected]/<org>/<private_poetry_repo>.git@<git_hash>#egg=<private_poetry_repo>! Will try again.
       Installing initially–failed dependencies…
       Collecting <private_poetry_repo> from git+ssh://[email protected]/<org>/<private_poetry_repo>.git@<git_hash>#egg=<private_poetry_repo>
         Cloning ssh://[email protected]/<org>/<private_poetry_repo>.git (to <git_hash>) to /tmp/pip-build-z1p7odkc/<private_poetry_repo>
       Warning: Permanently added the RSA host key for IP address '140.82.114.3' to the list of known hosts.
           Complete output from command python setup.py egg_info:
           Traceback (most recent call last):
             File "<string>", line 1, in <module>
             File "/app/.heroku/python/lib/python3.6/tokenize.py", line 452, in open
               buffer = _builtin_open(filename, 'rb')
           FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-z1p7odkc/<private_poetry_repo>/setup.py'
           
           ----------------------------------------
       
         Could not find a tag or branch '<git_hash>', assuming commit.
       Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-z1p7odkc/<private_poetry_repo>/
       You are using pip version 9.0.2, however version 20.1.1 is available.
       You should consider upgrading via the 'pip install --upgrade pip' command.
       
 !     Push rejected, failed to compile Python app.
 !     Push failed
@peterhadlaw
Copy link
Author

peterhadlaw commented May 21, 2020

FWIW I ended up doing something like this just to get it out, but not sure if you guys are pinning versions or anything else: master...peterhadlaw:214dd67379f322ea392be70824eedfb476154285

@edmorley
Copy link
Member

@peterhadlaw Hi! Thank you for filing this. The current pipenv support has a number of rough edges that are on my list to figure out as new Python owner. We also need to decide long term plans for pipenv support, given the community looks to be wanting to move onto other package managers (eg #921). I likely won't have concrete answers for a while, but will leave this open and update it as I know more.

@DylanBohlender
Copy link

For what it's worth, there appear to be signs of life from the pipenv maintainers - they've cut a couple of beta releases within the past month and appear to be working toward a stable release in the near term.

poetry support would be excellent too though! Since pipenv is the only package manager with first-class support from the Heroku Python buildpack (aside from vanilla pip of course), we've avoided straying from pipenv but would certainly appreciate more options.

edmorley added a commit that referenced this issue Feb 11, 2021
Previously the buildpack used pipenv `2018.5.18`, which didn't support
newer pip, meaning that apps using pipenv had to be pinned to a much
older version of pip.

For apps using pipenv, the buildpack now installs pipenv `2020.11.15`
and no longer overrides the pip version compared to non-pipenv installs,
meaning pip `20.1.1` is now used instead of pip `9.0.2`.

Changes:
https://github.com/pypa/pipenv/blob/master/CHANGELOG.rst#20201115-2020-11-15
pypa/pipenv@v2018.05.18...v2020.11.15

This is particularly important since the recently released `cryptography`
v3.4 requires at least pip 19.x, otherwise pip is unable to use its newer
style wheels, and so falls back to building the source distribution. This
causes the install to fail, since building `cryptography` now requires Rust,
which is not present in the Heroku stack image.

Fixes #979.
Fixes #987.
Fixes #1108.
Closes GUS-W-8054805.
edmorley added a commit that referenced this issue Feb 11, 2021
Previously the buildpack used pipenv `2018.5.18`, which didn't support
newer pip, meaning that apps using pipenv had to be pinned to a much
older version of pip.

For apps using pipenv, the buildpack now installs pipenv `2020.11.15`
and no longer overrides the pip version compared to non-pipenv installs,
meaning pip `20.1.1` is now used instead of pip `9.0.2`. (The pip version
is still pinned, but to the reasonably new pip version used by all other
non-pipenv builds.)

Changes:
https://github.com/pypa/pipenv/blob/master/CHANGELOG.rst#20201115-2020-11-15
pypa/pipenv@v2018.05.18...v2020.11.15

This is particularly important since the recently released `cryptography`
v3.4 requires at least pip 19.x, otherwise pip is unable to use its newer
style wheels, and so falls back to building the source distribution. This
causes the install to fail, since building `cryptography` now requires Rust,
which is not present in the Heroku stack image.

Fixes #979.
Fixes #987.
Fixes #1108.
Closes GUS-W-8054805.
@edmorley
Copy link
Member

Hi! Sorry for the delay in getting this resolved. I've just shipped #1169 for this, and there's a bit more context in:
#987 (comment)

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 a pull request may close this issue.

3 participants