Skip to content

Unknown scheme key: include #9616

Open
Open
@hexagonrecursion

Description

@hexagonrecursion

pip version

21.0.1

Python version

3.9.1

OS

Fedora release 32 (Thirty Two)

Additional information

No response

Description

When a wheel has an include directory in its .data directory pip install produces an error:

ERROR: For req: bug==1.0.0. Unknown scheme key used in /home/user/test/bug-1.0.0-py2.py3-none-any.whl: include (for file 'bug-1.0.0.data/include/bug.h'). .data directory contents should be in subdirectories named with a valid scheme key (data, headers, platlib, purelib, scripts)

PEP 427 https://www.python.org/dev/peps/pep-0427/#file-contents (emphasis mine)

{distribution}-{version}.data/ contains one subdirectory for each non-empty install scheme key not already covered, where the subdirectory name is an index into a dictionary of install paths (e.g. data, scripts, include, purelib, platlib).

Expected behavior

Either the PEP is wrong and should say headers instead of include or pip should accept include as valid

How to Reproduce

  1. Install the attached file: pip install bug-1.0.0-py2.py3-none-any.whl
    https://drive.google.com/file/d/1fYzqyV5cBBAp-ILBceEZyFPnE2bS3ug0/view?usp=sharing

Output

$ pip install bug-1.0.0-py2.py3-none-any.whl 
Processing ./bug-1.0.0-py2.py3-none-any.whl
Installing collected packages: bug
ERROR: For req: bug==1.0.0. Unknown scheme key used in /home/user/test/bug-1.0.0-py2.py3-none-any.whl: include (for file 'bug-1.0.0.data/include/bug.h'). .data directory contents should be in subdirectories named with a valid scheme key (data, headers, platlib, purelib, scripts)

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: wheelThe wheel format and 'pip wheel' commandPEP implementationInvolves some PEP

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions