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.

Allow users to exclude index args when creating requirements.txt

See original GitHub issue

Is 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:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
kaptajnencommented, Aug 22, 2022

The new command has not changed this behavior so it is still required to run pipenv requirements | sed '/^-/d' to get the desired output.

0reactions
matteiuscommented, Sep 3, 2022

@kaptajnen would a --no-index option to the requirements command that excluded any -i <index> lines be a suitable solution?

Read more comments on GitHub >

github_iconTop 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 >

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