Allow specifying --user during installation of poetry
See original GitHub issueOn Gentoo, pip
installation is recommended/enforced only with --user
option:
python3 get-poetry.py
Retrieving metadata
Installing version: 0.10.3
- Getting dependencies
- Vendorizing dependencies
- Installing poetry
An error has occured: Command '('/usr/lib/python-exec/python3.6/python3', '-m', 'pip', 'install', '--upgrade', '--no-deps', '/tmp/poetry-installer-hz3pap_8/poetry-0.10.3-py2.py3-none-any.whl')' returned non-zero exit status 1.
ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
As a workaround, I can use pip3 install --user poetry
. However, the same issue will resurface if I use
> poetry self:update --preview
Updating to 0.11.0a4
- Getting dependencies
- Vendorizing dependencies
- Updating poetry
[CalledProcessError]
An error has occured: Command '['/usr/bin/pip', 'install', '--upgrade', '--no-deps', '/tmp/poetry-update-
rryjj9s1/poetry-0.11.0a4-py2.py3-none-any.whl']' returned non-zero exit status 1.
ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
Hence, would be great to have
- an option to specify
--user
while installing poetry - let poetry register that it was installed using
--user
and keep the updates using the same option
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Allow specifying --user during installation of poetry · Issue #253
On Gentoo, pip installation is recommended/enforced only with --user option: python3 get-poetry.py Retrieving metadata Installing version: ...
Read more >Configuration | Documentation | Poetry - Python dependency ...
Configuration Poetry can be configured via the config command (see more about its usage here) or directly in the config.toml file that will...
Read more >Poetry: Dependency Management for Python - PyPI
Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right stack everywhere. Poet Install. The package is...
Read more >Poetry - The Blue Book
Poetry is a command line program that helps you declare, manage and install dependencies of Python projects, ensuring you have the right stack...
Read more >poetry install different package version based on extras
When installing or specifying poetry-built packages, the extras defined in the toml file can be activated as described in PEP-508 definition ...
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
Oh. I see:
Well, that’s a non-starter. In Gentoo Land, dependencies are always shared in common at the system level. Doing so substantially reduces attack surface and guarantees reproducibility across downstream consumers. Where exceptions exist (e.g., bundled Firefox libs), they do so only of absolute necessity. It’s unlikely that poetry satisfies that hard requirement.
Packaging poetry for Gentoo means circumventing
get-poetry.py
entirely, which means manually:sys.modules
hackery; possibly symlinks to existing system dependencies; possibly something unspeakably arcane, draconian, and/or mystifying. Just “Ugh.”It’s certainly feasible, albeit annoying and unnecessarily fragile. All of this could have been circumvented by poetry embracing existing build toolchains (e.g., CMake, Meson, Scons, Bazel,
distutils
) and system dependencies rather than attempting to reinvent the wheel in isolation.Scons is even pure-Python, assuming that was an overriding concern.
distutils
is, of course, even more readily accessible in the Python stdlib. There is no shame in leveraging existing build systems known to behave as expected across all requisite platforms and environments. From the system packaging perspective, non-standard build systems don’t exactly inspire confidence.At least I now know why poetry has yet to receive an official Gentoo package. Given the state of the installer, it seems unlikely it ever will, either. This is why we can’t have good things, all. 😞
Necrobump: assuming the new installer complies with the Gentoo ecosystem, I’m contemplating adding a
poetry
1.0.0a2 ebuild to my third-party Gentoo overlay. It won’t quite be official, of course – but some thing is better than no thing.I’ll probably fail horribly and end up doing absolutely nothing. On the offhand chance I actually do succeed, I’ll create an announcement issue here on the tracker. Huzzah!