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.

Add the option to create other sections in Pipfile

See original GitHub issue

A common pattern in Django projects is spliting requirements in differents files. We do this in our company following the recommendations of the Two Scoops of Django of @pydanny and @audreyr. In cookiecutter-django you can see this patterns: https://github.com/pydanny/cookiecutter-django/tree/master/{{cookiecutter.project_slug}}/requirements

So, my thought is that pipenv needs to provide more options besides the regular pipenv install and pipenv install --dev. Maybe something like pipenv install requests --section=production and then pipenv install --section=production to install all the production related packages.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:10
  • Comments:30 (13 by maintainers)

github_iconTop GitHub Comments

28reactions
kennethreitzcommented, Sep 27, 2017

not happening. explicitly designed for just two groups.

6reactions
patconcommented, May 8, 2018

Just want to add a use-case of how the two groups are less-than-ideal, although workable:

I would suggest that “groups” are for humans. they are for helping us organize are minds and the projects our minds build. in rubygems land, groups can be arbitrarily named. assuming that prod and dev as the distinction is not something that ecosystem tries to impose.

Example

One project I’m interested in doesn’t even use python on the production website, but has some processing tasks that happen locally to build assets. The two groups it wants to make distinction between are “devserver” (a mock api server that runs in python only locally) and “processing” (a bunch of long-compiling scientific packages for doing geospatial work). Forcing a project like this in the dev/prod dichotomy makes less sense.

Conclusion

Basically, I feel that the distinction is more opinionated than need be, and prevents the tool from speaking human in the way that users might like it to. In my example, we need to have docs (in the CLI instructions and the code comments) to explain this, instead of just having intuitive names of the groups that can go in a command line flag 😃

Anyhow, thanks so so much for all your hard work. Just wanted to provide a counter-point. Everything is work-aroundable, but I simply would contest that it shouldn’t need to be – it seems a reasonable ask. (fwiw, as someone who comes from php land, i feel rubygems and maybe go is the package management ecosystem to emulate, not composer)

Y’all are awesome! ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 3.x - Custom section in pipfile - Stack Overflow
Is it possible to set up a custom section ...
Read more >
Basic Usage of Pipenv - Read the Docs
Specify your target Python version in your Pipfile 's [requires] section. Ideally, you should only have one target Python version, as this is...
Read more >
pipenv Documentation - Read the Docs
This will create a Pipfile if one doesn't exist. If one does exist, it will automatically be edited with the new package you...
Read more >
Pipenv: A Guide to the New Python Packaging Tool
You should see something like the following in your terminal: Adding flask==0.12.1 to Pipfile's [packages]... Pipfile.lock not found, creating.
Read more >
Manage dependencies using Pipfile - IntelliJ IDEA - JetBrains
When you create a Pipenv environment either for a new or an existing project, the Pipfile is generated automatically. The file is added...
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