Ensure wheel isn't restricted to specific interpreter version#556
Ensure wheel isn't restricted to specific interpreter version#556
Conversation
This reverts commit 66c922f.
…ython-sdks into lukas/dont-infer-build
…ython-sdks into lukas/dont-infer-build
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
|
@codex Is hatch the right build system for this kind of project (native dependencies)? |
|
To use Codex here, create an environment for this repo. |
|
@codex Is hatch the right build system for this kind of project (native dependencies)? |
ResponseShort answer: Hatchling is a reasonable fit here because you’re not compiling a CPython extension; you’re bundling native shared libraries and shipping them as artifacts. The repo already uses a custom Hatch build hook to set platform tags appropriately for those native FFI assets, which is exactly the sort of customization hatchling supports. livekit-rtc/pyproject.tomlL1-L56 livekit-rtc/hatch_build.pyL1-L83 Why Hatchling is acceptable for native dependencies here
Avoiding “rewriting the platform tags logic”You already have centralized, reusable logic for platform tag selection in If you later change build systems, you can likely reuse the same helper logic from Suggested next stepIf the concern is portability or minimizing duplication:
If you want, I can propose a small refactor to make the platform tag logic reusable across build backends (while keeping hatchling in place). |
|
|
||
| class bdist_wheel(_bdist_wheel): | ||
| def finalize_options(self): | ||
| self.plat_name = get_platform_tag() |
There was a problem hiding this comment.
from sysconfig import get_platform
class bdist_wheel(_bdist_wheel):
def finalize_options(self):
self.plat_name = get_platform() # force a platform tag
_bdist_wheel.finalize_options(self)
you can use sysconfig
There was a problem hiding this comment.
Unfortunately not anymore.
As the minimum deployment target for (FFI) macosx is no longer 10.9 (which according to AI is the min deployment target of python) but rather 10.15. (see https://github.com/livekit/python-sdks/actions/runs/21109309584/job/60705482927 for the failing run with defaults)This leads us to have to add platform parsing/adjustments also for setuptools.
additionally updates e2e tests to use built wheels directly, see #557