Allow users to exclude index args when creating requirements.txt
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently the output of pipenv lock -r
includes index arguments (e.g. -i https://somehost/simple
) unconditionally (see https://github.com/pypa/pipenv/blob/d69198c0fb13a0ff92a6d105f2eb07f23ceb70b5/pipenv/core.py#L849). If you are using different repositories for your local environment and production (e.g. if you are using devpi locally), you need to manually delete those lines before deploying to production.
Describe the solution you’d like
I would like it if the inclusion of index arguments in requirements.txt was configurable, through a command-line flag or a setting in the Pipfile (or both)
Describe alternatives you’ve considered
An alternative would be to exclude the arguments when --pypi-mirror
is set to an empty string when executing pipenv lock
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
pip requirements.txt with alternative index - Stack Overflow
Most of the repoze packages don't seem to be on PyPi, but there's an alternative PyPi index for them here. But I can't...
Read more >Advanced Usage of Pipenv - Read the Docs
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock . There are some known issues with using...
Read more >pipenv Documentation - Read the Docs
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the. Python...
Read more >pip install - pip documentation v22.3.1
pip install has several stages: Identify the base requirements. The user supplied arguments are processed here. Resolve dependencies. What will be installed is ......
Read more >Python Requirements - Serverless Framework: Plugins
A Serverless Framework plugin to automatically bundle dependencies from requirements.txt and make them available in your PYTHONPATH .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The new command has not changed this behavior so it is still required to run
pipenv requirements | sed '/^-/d'
to get the desired output.@kaptajnen would a
--no-index
option to therequirements
command that excluded any-i <index>
lines be a suitable solution?