-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged
Description
Description
eg I am on ubuntu 24.04, and have a virtual environment derived from /usr/bin/python3.12, which in turns comes from the python3.12-minimal package:
$ dpkg -S /usr/bin/python3.12
python3.12-minimal: /usr/bin/python3.12
in that parent python:
>>> sysconfig.get_paths()
{'stdlib': '/usr/lib/python3.12', 'platstdlib': '/usr/lib/python3.12', 'purelib': '/usr/local/lib/python3.12/dist-packages', 'platlib': '/usr/local/lib/python3.12/dist-packages', 'include': '/usr/include/python3.12', 'platinclude': '/usr/include/python3.12', 'scripts': '/usr/local/bin', 'data': '/usr/local'}
and sure enough, /usr/local/lib/python3.12/dist-packages is an empty directory (I run a tight ship)
poetry unit tests assert that this is impossible:
$ pytest -k test_env_system_packages_are_relative_to_lib
...
=================================================== short test summary info ====================================================
FAILED tests/utils/env/test_env.py::test_env_system_packages_are_relative_to_lib[False] - Failed: No distributions found in the base environment of the virtualenv
FAILED tests/utils/env/test_env.py::test_env_system_packages_are_relative_to_lib[True] - Failed: No distributions found in the base environment of the virtualenv
Workarounds
I guess I could install something on my system just to keep the poetry unit tests happy
Poetry Installation Method
other
Operating System
Ubuntu 24.04
Poetry Version
1.8.4
Poetry Configuration
n/aPython Sysconfig
No response
Example pyproject.toml
n/aPoetry Runtime Logs
n/aReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged