Skip to content

Commit 4256f90

Browse files
committed
fix project table
1 parent 950f732 commit 4256f90

File tree

2 files changed

+64
-52
lines changed

2 files changed

+64
-52
lines changed

livekit-rtc/pyproject.toml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,62 @@
11
[build-system]
22
requires = [
3-
"setuptools>=42",
3+
"setuptools>=61",
44
"wheel",
55
"requests",
66
]
77
build-backend = "setuptools.build_meta"
88

9+
[project]
10+
name = "livekit"
11+
dynamic = ["version"]
12+
description = "Python Real-time SDK for LiveKit"
13+
readme = "README.md"
14+
requires-python = ">=3.9.0"
15+
license = "Apache-2.0"
16+
keywords = ["webrtc", "realtime", "audio", "video", "livekit"]
17+
authors = [
18+
{ name = "LiveKit", email = "support@livekit.io" }
19+
]
20+
classifiers = [
21+
"Intended Audience :: Developers",
22+
"License :: OSI Approved :: Apache Software License",
23+
"Topic :: Multimedia :: Sound/Audio",
24+
"Topic :: Multimedia :: Video",
25+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3 :: Only",
30+
]
31+
dependencies = [
32+
"protobuf>=4.25.0",
33+
"types-protobuf>=3",
34+
"aiofiles>=24",
35+
"numpy>=1.26",
36+
]
37+
38+
[project.urls]
39+
Documentation = "https://docs.livekit.io"
40+
Website = "https://livekit.io/"
41+
Source = "https://github.com/livekit/python-sdks/"
42+
43+
[tool.setuptools.dynamic]
44+
version = { attr = "livekit.rtc.version.__version__" }
45+
46+
[tool.setuptools.packages.find]
47+
include = ["livekit.*"]
48+
49+
[tool.setuptools.package-data]
50+
"livekit.rtc" = ["_proto/*.py", "py.typed", "*.pyi", "**/*.pyi"]
51+
"livekit.rtc.resources" = [
52+
"*.so",
53+
"*.dylib",
54+
"*.dll",
55+
"LICENSE.md",
56+
"*.h",
57+
"jupyter-html/index.html",
58+
]
59+
960
[tool.cibuildwheel]
1061
build = "cp39-*"
1162
skip = "*-musllinux_*" # not supported (libwebrtc requires glibc)

livekit-rtc/setup.py

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

15+
"""Custom setup.py for platform-specific wheel tagging.
16+
17+
This file exists solely to customize the wheel platform tag. All package metadata
18+
is defined in pyproject.toml.
19+
20+
The native FFI libraries (.so/.dylib/.dll) require specific platform tags that
21+
respect MACOSX_DEPLOYMENT_TARGET and ARCHFLAGS environment variables set by
22+
cibuildwheel, rather than using sysconfig.get_platform() which returns Python's
23+
compile-time values.
24+
"""
25+
1526
import os
16-
import pathlib
1727
import platform
1828
import sys
19-
from typing import Any, Dict
2029

2130
import setuptools # type: ignore
2231
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel # type: ignore
2332

24-
here = pathlib.Path(__file__).parent.resolve()
25-
about: Dict[Any, Any] = {}
26-
with open(os.path.join(here, "livekit", "rtc", "version.py"), "r") as f:
27-
exec(f.read(), about)
28-
2933

3034
def get_platform_tag():
31-
"""Get the wheel platform tag for the current/target platform.
32-
33-
On macOS, we must respect MACOSX_DEPLOYMENT_TARGET and ARCHFLAGS environment
34-
variables that cibuildwheel sets, rather than using sysconfig.get_platform()
35-
which returns Python's compile-time values.
36-
"""
35+
"""Get the wheel platform tag for the current/target platform."""
3736
if sys.platform == "darwin":
3837
# Get deployment target from environment (set by cibuildwheel) or fall back
3938
target = os.environ.get("MACOSX_DEPLOYMENT_TARGET")
@@ -72,45 +71,7 @@ def finalize_options(self):
7271

7372

7473
setuptools.setup(
75-
name="livekit",
76-
version=about["__version__"],
77-
description="Python Real-time SDK for LiveKit",
78-
long_description=(here / "README.md").read_text(encoding="utf-8"),
79-
long_description_content_type="text/markdown",
80-
url="https://github.com/livekit/python-sdks",
8174
cmdclass={
8275
"bdist_wheel": bdist_wheel,
8376
},
84-
classifiers=[
85-
"Intended Audience :: Developers",
86-
"License :: OSI Approved :: Apache Software License",
87-
"Topic :: Multimedia :: Sound/Audio",
88-
"Topic :: Multimedia :: Video",
89-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
90-
"Programming Language :: Python :: 3",
91-
"Programming Language :: Python :: 3.9",
92-
"Programming Language :: Python :: 3.10",
93-
"Programming Language :: Python :: 3 :: Only",
94-
],
95-
keywords=["webrtc", "realtime", "audio", "video", "livekit"],
96-
license="Apache-2.0",
97-
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
98-
python_requires=">=3.9.0",
99-
install_requires=["protobuf>=4.25.0", "types-protobuf>=3", "aiofiles>=24", "numpy>=1.26"],
100-
package_data={
101-
"livekit.rtc": ["_proto/*.py", "py.typed", "*.pyi", "**/*.pyi"],
102-
"livekit.rtc.resources": [
103-
"*.so",
104-
"*.dylib",
105-
"*.dll",
106-
"LICENSE.md",
107-
"*.h",
108-
"jupyter-html/index.html",
109-
],
110-
},
111-
project_urls={
112-
"Documentation": "https://docs.livekit.io",
113-
"Website": "https://livekit.io/",
114-
"Source": "https://github.com/livekit/python-sdks/",
115-
},
11677
)

0 commit comments

Comments
 (0)