question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please provide a way to install pipenv without using vendored dependencies

See original GitHub issue

As discussed in #1885 it is very hard for downstream (i.e. Debian) maintainers to package pipenv when it provides almost all its dependencies in the vendor and patched directory.

Quoting myself from https://github.com/pypa/pipenv/issues/1885#issuecomment-377778859

My main concern is still security: If your dependencies also handle their dependencies by vendoring them (and theirs) you’ll end up with multiple versions of the same package inside your vendors directory (e.g. the requests package). If one of those packages needs an update you’ll have a hard time fixing all of them. For downstream maintainers (Debian, Suse, etc) it is even worse as we usually just update the problematic library and assume this bug to be fixed for all packages depending on it. Now we actively have to search for copies of that library everywhere.

So in order to make life for downstream package maintainers easier, please provide a way – similar to what pip does – to install pipenv “unbundeled” and thus using the packages installed on the target system.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:29 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Mar 20, 2019

Yes, I don’t object to your proposal of repurposing them to distinguish between different kinds of patching, my comment was merely exaplaining why they seem to lack clarity.

1reaction
jayvdbcommented, Mar 26, 2019

I’ve gone through the process of complete de-vendoring of pipenv/vendor, with only a few non-internet tests failing. Also see https://github.com/pypa/pipenv/issues/3630 for the tests which are failing probably due to not being declared as needing internet/bugs in the mocking. I am going through the process a second time now, hopefully cleaner, to avoid functional breakages caused by my first de-vendoring.

IMO the first step should be more clarity between pipenv/vendor vs pipenv/patched. There are quite a few packages in pipenv/vendor which are actually functionally patched, and IMO they should be moved to patched , or vendor and patched merged and the patches more clearly split into functional-changes-only and vendoring-only patches, ideally with functional-changes patches applied first (as upstream and de-vendoring needs them to cleanly apply to the upstream sdist), and vendoring patches based on top of the functional-changes-only patches where applicable.

And a concerted effort needs to be put into upstreaming the functional-changes patches. I’ve found several patches which havent been provided to upstream, and sometimes I couldnt find an issue raised upstream. Probably there are good reasons for this, but it work to be done. Also there are a few functional changes which obviously are not acceptable upstream, such as the sys.path.append at https://github.com/pypa/pipenv/blob/dc41e66/pipenv/vendor/pipdeptree.py#L17 , and as others have indicated those are hacks which need to be removed before they can be de-vendored normally, and some are probably really not easy to remove (and not a priority for the core devs). IMO people wanting to de-vendor are going to need to help tackling these problems.

Anyone interested can find all pipenv/vendor and some pipenv/patched packages as .spec files in https://build.opensuse.org/project/show/devel:languages:python , and https://build.opensuse.org/project/show/home:jayvdb:coala:python3-bears has some patches applied. A static copy of the messy first iteration of de-vendored pipenv .spec can find it at https://build.opensuse.org/package/show/home:jayvdb:branches:home:jayvdb:coala:python3-bears/python-pipenv

The following are my notes wrt the patches in the 2018.11.26 release - some of these are now irrelevant, but packagers of 2018.11.26 release will still benefit from them.

Most important is https://github.com/pypa/pipenv/commit/be3c7714ee374ad0311becccbe72fdbe54414767 , not a listed patch, replacing cursor with vistir due to recently uncovered legal problems with using GPL cursor in a non-GPL project.

vendor/patches:

patched/patches:

There are also a few other patches possibly needed by de-vendoring

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv Documentation - Read the Docs
INSTALL PIPENV TODAY! The recommended way to install pipenv on most platforms is to install from pypi using pip: $ pip install --user...
Read more >
How to use pipenv to install package from github
This means all dependencies are compiled except spaCy. Then installing without -e pipenv install git+https://github.com/explosion/spaCy#egg= ...
Read more >
pipenv Documentation
It will show you how to install and use the necessary tools and make strong recommendations on best practices.
Read more >
How to manage Python projects with Pipenv - ARN
Open a console in your project directory and type pipenv install <package_name> to install a package for the project. To specify that the...
Read more >
Python Buildpack | Cloud Foundry Docs
The Python buildpack supports dependency installation using PIP when a ... The buildpack does not provide multiple versions of its ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found