rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

py_wheel: Add support for adding path prefix

Open alokpr opened this issue 4 years ago • 7 comments

🚀 feature request

Relevant Rules

py_wheel

Description

Support an attribute to add a path prefix to the import path. This will be opposite of the existing attribute - strip_path_prefixes. This is especially useful for packaging native extensions (.so) into a top-level namespace.

alokpr avatar Aug 22 '21 16:08 alokpr

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!

github-actions[bot] avatar Feb 18 '22 22:02 github-actions[bot]

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

github-actions[bot] avatar Mar 21 '22 22:03 github-actions[bot]

Would love to see this re-opened - adding a prefix would be really useful.

jdavidheiser avatar Jun 22 '23 19:06 jdavidheiser

Posterity. This looks pretty easy. Add an attribute to py_wheel rule. Pass it as an arg to wheelmaker action. In wheelmaker.py, when writing the package file into the wheel zip, prepend the path prefix. This is right around where the strip prefix code is.

rickeylev avatar Jun 25 '23 08:06 rickeylev

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!

github-actions[bot] avatar Dec 22 '23 22:12 github-actions[bot]

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

github-actions[bot] avatar Jan 21 '24 22:01 github-actions[bot]

It's really a nice-have....

miklelappo avatar Jul 08 '24 08:07 miklelappo