-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Needs TriageIssues that need to be evaluated for severity and status.Issues that need to be evaluated for severity and status.bug
Description
setuptools version
setuptools==65.5.0
Python version
Python 3.11
OS
macOS
Additional environment information
a venv name '.venv'
pip 24.2
Description
When using pip install -e .
with a src-layout
, an entry is typically added to sys.path
via a file named __editable__.pakagename.pth
. However, the loading of this .pth
file fails if the virtual environment is hidden, which is the case for the default .venv
name used by many tools.
To be precise, cpython/Lib/site.py
uses os.lstat
on the .pth
file and skips it.
It is likely the same on other Unix-like systems.
Expected behavior
Since src-layout
and editable installs are frequently used, they should be supported regardless of the virtual environment's naming convention or visibility status.
How to Reproduce
create a venv with a name starting by a dot, typically .venv
use a src-layout
python3 -v -m packagename
Output
Skipping hidden .pth file: '/project_folder/.venv/lib/python3.11/site-packages/__editable__.packagename.pth'
Metadata
Metadata
Assignees
Labels
Needs TriageIssues that need to be evaluated for severity and status.Issues that need to be evaluated for severity and status.bug