FS#65296 - [python-poetry] poetry ignores pyenv local version

Attached to Project: Community Packages
Opened by Austin Keller (concocki) - Tuesday, 28 January 2020, 02:48 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 30 August 2020, 19:13 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

poetry doesn't respect pyenv local python version


Additional info:

```bash
> pacman -Q python-poetry
python-poetry 1.0.2-1
```

Steps to reproduce:

```bash
sudo pacman -S python-poetry pyenv

# Assuming that your system python is not 3.7.5. If it's 3.7.5, use 3.7.4
pyenv install 3.7.5

mkdir tmp
cd tmp

# Creates .python-version file, instructing pyenv to use python 3.7.5
pyenv local 3.7.5
poetry init

# Something to make sure that poetry's virtualenv is initialized
poetry run which python

# Shows that system python is being used instead of 3.7.5. This does not happen when installing poetry manually via get-poetry.py
poetry env info
```
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 30 August 2020, 19:13 GMT
Reason for closing:  Not a bug
Comment by Eli Schwartz (eschwartz) - Sunday, 30 August 2020, 19:10 GMT
I don't understand how this is supposed to be a bug. A distro package for poetry is of course installed for the distro version of python, not pyenv. If you want to use pyenv, you should install poetry from within pyenv.

get-poetry.py downloads and installs poetry plus all of its dependencies including unvetted compiled C extensions for 6 different versions of python to a custom directory (python 2.7, 3.5, 3.6, 3.7, 3.8, 3.9), then adds a "poetry" script that selects the "right" version, adds it to the PYTHONPATH, and runs it. This is a insane use case. No other software works like this, not even the ones which, like poetry, are python package managers.
Comment by Eli Schwartz (eschwartz) - Sunday, 30 August 2020, 19:13 GMT
Not that this matters anyway since your account contains an invalid email address which breaks the bugtracker software and doesn't permit receiving notifications.

Loading...