Passing pip Install Parameters
See original GitHub issueI 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)
Which I think could then be passed to this install step:
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top 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 >
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 Free
Top 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
I’ve opened #398 for the question of collecting pip options from the exported requirements.
Thanks for the quick reply!
You’re right,
poetry export
does include theindex-url
! However, the trusted host argument is missing, sopip 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 workaroundI think this issue can probably be closed as not within nox_poetry scope? Or reopened if you wanted to pursue parsing the pip arguments