Skip to content

Commit a77adb4

Browse files
committed
Merge branch 'lukas/dont-infer-build' into lukas/e2e-tests
2 parents 108b61b + c658ce4 commit a77adb4

File tree

3 files changed

+36
-38
lines changed

3 files changed

+36
-38
lines changed

livekit-rtc/hatch_build.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,34 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import sys
16+
1517
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
1618

1719

1820
class CustomBuildHook(BuildHookInterface):
1921
def initialize(self, version, build_data):
20-
"""Force platform-specific wheel due to native libraries"""
22+
"""Force platform-specific wheel with py3-none tag.
23+
24+
The native libraries (.so, .dylib, .dll) are not Python C extensions -
25+
they're standalone FFI libraries loaded at runtime. This means they
26+
don't depend on a specific CPython ABI, so we use py3-none to indicate
27+
compatibility with any Python 3.x version while keeping the platform tag.
28+
"""
2129
build_data["pure_python"] = False
22-
build_data["infer_tag"] = True
30+
build_data["infer_tag"] = False
31+
32+
# Get the platform tag using hatchling's logic (handles MACOSX_DEPLOYMENT_TARGET, etc.)
33+
from packaging.tags import sys_tags
34+
35+
tag = next(
36+
t for t in sys_tags() if "manylinux" not in t.platform and "musllinux" not in t.platform
37+
)
38+
platform = tag.platform
39+
40+
if sys.platform == "darwin":
41+
from hatchling.builders.macos import process_macos_plat_tag
42+
43+
platform = process_macos_plat_tag(platform, compat=True)
44+
45+
build_data["tag"] = f"py3-none-{platform}"

livekit-rtc/livekit/rtc/_proto/participant_pb2.py

Lines changed: 10 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi

Lines changed: 1 addition & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)