Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variant of source_mapping that maps prefixes, not files #30

Open
thatch opened this issue Oct 6, 2021 · 0 comments
Open

Variant of source_mapping that maps prefixes, not files #30

thatch opened this issue Oct 6, 2021 · 0 comments

Comments

@thatch
Copy link
Member

thatch commented Oct 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant