Skip to content

feat(pypi): install action-built wheels in py_wheel_library - #4

Open
jvolkman wants to merge 1 commit into
feat/experimental-action-sdistfrom
feat/py-wheel-library-built-wheels
Open

jvolkman wants to merge 1 commit into
feat/experimental-action-sdistfrom
feat/py-wheel-library-built-wheels

Conversation

@jvolkman

@jvolkman jvolkman commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #3 (feat/experimental-action-sdist).

Extends py_wheel_library and action_whl_installer.py to install .whldir directories produced by py_sdist_wheel:

  • py_wheel_library accepts .whldir directories via its wheel attribute, along with a site_paths attribute (using pypi_name= / pypi_version= tags for package and version metadata) for action-built wheels whose .whl filename and file list are not known at analysis time.
  • Normalizes extracted .dist-info directory names to deterministic <dist>-<version>.dist-info when --dist-info-dir is passed, and rewrites .dist-info/ path prefixes in RECORD to match.
  • Venv site_paths guardrail: When experimental_venvs_site_packages is enabled on an action-built wheel (not ctx.attr.extracted_files), py_wheel_library creates venv link entries at analysis time for each declared entry in site_paths and namespace_package_files and passes --validate-site-packages + --expected-site-path to action_whl_installer.py. At execution time, action_whl_installer.py verifies that every non-excluded installed file under site-packages/ is covered by a declared site_paths entry and every declared entry exists, failing with an actionable error message pointing to site_paths in pip.whl_mods / package_annotation if the sdist's installed layout diverges from its static site_paths.

@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from 62154f3 to cd30307 Compare October 26, 2026 01:24
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from e209526 to 336ad25 Compare October 26, 2026 01:24
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from cd30307 to bb48f2c Compare October 26, 2026 03:02
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from 336ad25 to 64caca1 Compare October 26, 2026 03:02
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from bb48f2c to f22c1c3 Compare October 26, 2026 03:20
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from 64caca1 to 8f0623b Compare October 26, 2026 03:20
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from f22c1c3 to f2e8cd3 Compare October 26, 2026 15:41
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch 2 times, most recently from 057def0 to a36afbb Compare October 26, 2026 19:07
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from f2e8cd3 to 63a0fb5 Compare October 26, 2026 19:07
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from a36afbb to d6b5c25 Compare October 26, 2026 20:20
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from 63a0fb5 to 5f8929f Compare October 26, 2026 20:20
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from d6b5c25 to e20e6b4 Compare October 26, 2026 20:56
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from 5f8929f to 5585ef1 Compare October 26, 2026 20:56
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from e20e6b4 to c942c4c Compare October 26, 2026 23:20
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch 2 times, most recently from b5b4eb9 to ef9a639 Compare November 1, 2026 04:12
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from c942c4c to eebe866 Compare November 1, 2026 04:12
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from ef9a639 to dd12c3d Compare November 1, 2026 16:10
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from eebe866 to c16495d Compare November 1, 2026 16:10
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from dd12c3d to 8b06ecc Compare November 2, 2026 05:31
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch 2 times, most recently from ab6bb35 to ce887e1 Compare November 2, 2026 06:18
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from 8b06ecc to 11e414d Compare November 2, 2026 06:18
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from ce887e1 to 68cc44c Compare November 2, 2026 21:18
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from 11e414d to 41504ff Compare November 2, 2026 21:18
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from 41504ff to a40684f Compare November 11, 2026 00:44
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch 2 times, most recently from 9d37d99 to 7841e8e Compare November 11, 2026 06:45
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch 2 times, most recently from 3e605a2 to 5154fa3 Compare November 12, 2026 06:34
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from 7841e8e to 4a5eed9 Compare November 12, 2026 06:34
Extends py_wheel_library and action_whl_installer to consume action-built
wheels (.whldir TreeArtifacts):
- Adds site_paths, distribution, and version attributes to py_wheel_library
  and consumes PyBuiltWheelInfo.
- Exposes extracted .dist-info/entry_points.txt via OutputGroupInfo.dist_info
  (--entry-points-output) for action-built wheel console scripts.
- Normalizes the installed .dist-info directory name via --dist-info-dir
  (and updates RECORD entries) so importlib.metadata works in venv mode.
- Validates predicted site_paths against installed site-packages contents in
  action_whl_installer when venvs_site_packages=yes (--expected-site-path).
@jvolkman
jvolkman force-pushed the feat/py-wheel-library-built-wheels branch from 4a5eed9 to d8ddd3d Compare November 13, 2026 04:52
@jvolkman
jvolkman force-pushed the feat/experimental-action-sdist branch from 5154fa3 to 80f3fdc Compare November 13, 2026 04:52
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

Successfully merging this pull request may close these issues.

1 participant