pypa / pipenv

Python Development Workflow for Humans.
https://pipenv.pypa.io
MIT License
24.87k stars 1.87k forks source link

Sharing dev dependencies between projects #3664

Open alexhall opened 5 years ago

alexhall commented 5 years ago

My team has a mondorepo-style setup (single Github repo with several Python projects that are tested, built, and deployed independently). We're looking at using pipenv to set each project up with its own Pipfile and virtual-environment, to allow us to isolate project dependencies.

At the same time, we want to be able to share a standard set of development dependencies between these projects (e.g. mypy, pytest, autopep8) to support a standard team development environment. It would appear that our options right now are either:

Is there a recommended setup, using pipenv or any other standard tooling, which lets us maintain per-project application dependencies with shared dev dependencies that still gives us isolation and repeatability?

SwampFalc commented 5 years ago

I came into this ticket because I basically would like the same thing.

But while trying a few bits and bobs out, I realized pipenv will use the Pipfile in the directory you're in. If you make a "dev" folder and put a Pipfile in there with only the dev-packages section, you should be able to basically pipenv twice.

techalchemy commented 5 years ago

The proposal sounds interesting, but I believe we would need to see the idea laid out in an enhancement proposal (a markdown document submitted via a PR to the peeps directory, see PEEP-001) basically to let us know how this behavior should work and what changes would be required to accomplish it so that we can be sure we understand the request

alexhall commented 5 years ago

@techalchemy I'm happy to write up a proposal, though it's doubtful I'll have time to contribute anything to its implementation. My main goal in opening this issue was to see if such functionality is currently supported.