Skip to content

editable_wheel is broken in 68.1.0 #4019

Closed
@emontnemery

Description

@emontnemery

setuptools version

setuptools==68.1.0

Python version

Python 3.11

OS

Linux

Additional environment information

No response

Description

setuptools 68.1.0 broke editable_wheels due to commit db3743a from #3995

To my understanding, the problem is that _find_nested_spec passes the wrong path to PathFinder.find_spec(rest, path=[parent_path])

Expected behavior

Pass the full path to PathFinder.find_spec.
Doing that requires a lookup to happen first though, which pretty much defeats the purpose of db3743a though as I understand it, which was to let Python handle the case insensitive lookup.

How to Reproduce

This is how PathFinder.find_spec treats its input path, note how it only cares about the tail of the name to lookup:

python3 -vv
>>> from importlib.machinery import PathFinder
>>> PathFinder.find_spec("components.persistent_notification.loader", ["/home/erik/development/home-assistant_fork/"])

Output

# trying /home/erik/development/home-assistant_fork/loader.cpython-311-x86_64-linux-gnu.so
# trying /home/erik/development/home-assistant_fork/loader.abi3.so
# trying /home/erik/development/home-assistant_fork/loader.so
# trying /home/erik/development/home-assistant_fork/loader.py
# trying /home/erik/development/home-assistant_fork/loader.pyc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions