_contains_egg_info
gives false positive for file://
URL with dash in directory name
#13093
Open
1 task done
Labels
Description
The regex used for
_contains_egg_info
(pip/src/pip/_internal/wheel_builder.py
Lines 32 to 42 in fe0925b
foo-bar
but will not matchfoo
orfoo_bar
(regardless of the the distribution/package name). This means that dependencies onfoo-bar @ file://some/path/to/foo-bar
will cache the built wheel, whilefoo-bar @ file://some/path/to/foo_bar
will not.In my case this happens with
extra_requires = {"bar": ["foo-bar @ file://some/path/to/foo-bar"]}
, and thenpip install ./path/to/foo[bar]
. With dash in the directory name, the built wheel is cached, and without dash the wheel is not cached.Expected behavior
Wheels caching should not depend on the name of a local directory, and ideally there should not be any caching here. It is my understanding that pip does not cache wheels built from local path.
pip version
24.3.1
Python version
3.12
OS
macOS
How to Reproduce
There is a reproducing example here: https://github.com/Luthaf/pip-cache-issue. You can reproduce with
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: