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.

Passing pip Install Parameters

See original GitHub issue

I need pip to use an index-url for an internal repository (hosted with devpi), but it doesn’t look like there is a way to pass arguments to pip for the initial install other than any global configuration (pip config edit)

The best way would be for poetry export to also export pip parameters (docs) in the requiremts.txt file, but getting that merged would be hard given the ~200 PR backlog 😢

The index URL is listed in tool.poetry.source of pyproject.toml, so nox-poetry could potentially extract it from there, but it might be more flexible to add a pip_params argument to nox_session instead (like the nox venv_params kwarg that exists now)

https://github.com/cjolowicz/nox-poetry/blob/8e0262b4412a965e841dd7cda34aab83b58687ae/src/nox_poetry/sessions.py#L21

Which I think could then be passed to this install step:

https://github.com/cjolowicz/nox-poetry/blob/8e0262b4412a965e841dd7cda34aab83b58687ae/src/nox_poetry/sessions.py#L153

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cjolowiczcommented, Jun 14, 2021

I’ve opened #398 for the question of collecting pip options from the exported requirements.

1reaction
KyleKingcommented, Jun 14, 2021

Thanks for the quick reply!

You’re right, poetry export does include the index-url! However, the trusted host argument is missing, so pip install wouldn’t work out of the box (the internal domain is HTTP)

Having nox-poetry handle the pip arguments would be nice, but I’m generally happy with the global pip config appraoch. That is how our developer computers should be configured. We don’t have multiple index-urls, but if needed, the PIP_INDEX_URL would be a good workaround

I think this issue can probably be closed as not within nox_poetry scope? Or reopened if you wanted to pursue parsing the pip arguments

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install - pip documentation v22.3.1
The install command has a --report option that will generate a JSON report of what pip has installed. In combination with the --dry-run...
Read more >
How to obtain arguments passed to setup.py from pip with
In the run method you can expose the value of the option to setup.py (in my example I use a global variable). from...
Read more >
pip-install command man page - python3-pip | ManKier
Install a package: pip install package_name · Install a specific version of a package: pip install package_name == package_version · Install packages listed...
Read more >
pip install — pip 10.0.0.dev0 documentation
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 >
Passing commands to pip install · Issue #36 - GitHub
It looks like the current setup.py script does not support the ... /how-to-obtain-arguments-passed-to-setup-py-from-pip-with-install-option.
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