Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipfile: shell variable assignment from environment variables AND allow defaults #3920

Closed
adriantorrie opened this issue Aug 29, 2019 · 1 comment
Labels

Comments

@adriantorrie
Copy link

adriantorrie commented Aug 29, 2019

Is your feature request related to a problem? Please describe.

We have wish to have PIP_INDEX_URL default to pypi for our developers on their local machines, but when we run it through our CI we wish to replace the value for PIP_INDEX_URL to point to our private index (corporate).

Describe the solution you'd like

./Pipfile

[[source]]
name = "home"
url = "${PIP_INDEX_URL:-https://pypi.org/simple}"    # Allow shell-like variable assignment
verify_ssl = true

Once a repo is cloned locally by a dev, the isolated python environment can be created by with a simple command:

pipenv install --dev

Within a CI pipeline, the env var PIP_INDEX_URL will be set to the corporate package index and will "just work" as well.

Describe alternatives you've considered

Local developer machine

.env

PIP_INDEX_URL=https://pypi.org/simple

Pipfile

`./Pipfile`
```sh
[[source]]
name = "home"
url = "${PIP_INDEX_URL}"
verify_ssl = true

To install:

pipenv shell

pipenv install --dev

Additional context

Add any other context or screenshots about the feature request here. It may be a good idea to mention that platform and Python version you are on.


Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.

If you're on macOS, run the following:

$ pipenv --support | pbcopy

If you're on Windows, run the following:

> pipenv --support | clip

If you're on Linux, run the following:

$ pipenv --support | xclip
@matteius
Copy link
Member

matteius commented Mar 2, 2023

@adriantorrie this issue is pretty old at this point, but latest pipenv has support to read from the pip.conf/pip.ini -- perhaps this would resolve this issue for the time being.

@matteius matteius closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants