Skip to content

Variant of source_mapping that maps prefixes, not files #30

@thatch

Description

@thatch

Background

source_mapping basically lists out every file that ought to be included when building a wheel, giving source and dest name. For example,

setup(
  package_dir = "src"
  packages = ["a", "b"],
  py_modules = ["c"],
)

might return

{
  "a/__init__.py": "src/a/__init__.py",
  "b/__init__.py": "src/b/__init__.py",
  "c.py": "src/c.py",
}

This task

Make a new source_mapping_prefix method that just gives back more like

{
  "a": "src/a",
  "b": "src/b",
  "c.py": "src/c.py",
}

Alternatively you could have a dict of prefix to list of tuple of item src/dest, but the example above is probably easier. Most of the effort is in coming up with good test data, and making this work for all the backends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions