rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

Clarify if py_wheel only supports pure Python wheels

Open tholenst opened this issue 7 months ago • 2 comments

According to https://github.com/bazel-contrib/rules_python/blob/a4b946bbe1b3e83ca4602a0d059fea823b0ded65/python/packaging.bzl#L102, py_wheel only supports pure python wheels.

However, looking around it seems to me that this comment is outdated, so I thought I'd ask if this is still up to date.

Thank you!

tholenst avatar May 05 '25 13:05 tholenst

Yeah, that comment is a bit outdated/misleading.

By "pure python" it more means that there isn't any special support for e.g. putting a cc_library in it and having something magic happen that gives you an e.g. manylinux compatible output with the appropriate ABI tags in the wheel name.

A C++ shared library or CPython C extension shared library can still be packaged by it, it just has to be treated as an opaque data dependency. It's on the user to add a target that creates the desired output.

rickeylev avatar May 05 '25 19:05 rickeylev

The https://github.com/jvolkman/repairwheel can then be used to ensure that the wheel works correctly.

aignas avatar May 07 '25 23:05 aignas