Skip to content

Commit 05f1d73

Browse files
committed
Ensure wheel isn't restricted to specific interpreter version
1 parent b62686e commit 05f1d73

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

livekit-rtc/hatch_build.py

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

15+
from sysconfig import get_platform
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 Python version's ABI, so we use py3-none
27+
to indicate compatibility with any Python 3.x version.
28+
"""
2129
build_data["pure_python"] = False
22-
build_data["infer_tag"] = True
30+
build_data["infer_tag"] = False
31+
build_data["tag"] = f"py3-none-{get_platform().replace('-', '_').replace('.', '_')}"

0 commit comments

Comments
 (0)