|
| 1 | +# Copyright 2023 LiveKit, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +import os |
| 16 | +import pathlib |
| 17 | +from sysconfig import get_platform |
| 18 | +from typing import Any, Dict |
| 19 | + |
| 20 | +import setuptools # type: ignore |
| 21 | +import setuptools.command.build_py # type: ignore |
| 22 | +from wheel.bdist_wheel import bdist_wheel as _bdist_wheel # type: ignore |
| 23 | + |
| 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 | + |
| 29 | + |
| 30 | +class bdist_wheel(_bdist_wheel): |
| 31 | + def finalize_options(self): |
| 32 | + self.plat_name = get_platform() # force a platform tag |
| 33 | + _bdist_wheel.finalize_options(self) |
| 34 | + |
| 35 | + |
| 36 | +setuptools.setup( |
| 37 | + name="livekit", |
| 38 | + version=about["__version__"], |
| 39 | + description="Python Real-time SDK for LiveKit", |
| 40 | + long_description=(here / "README.md").read_text(encoding="utf-8"), |
| 41 | + long_description_content_type="text/markdown", |
| 42 | + url="https://github.com/livekit/python-sdks", |
| 43 | + cmdclass={ |
| 44 | + "bdist_wheel": bdist_wheel, |
| 45 | + }, |
| 46 | + classifiers=[ |
| 47 | + "Intended Audience :: Developers", |
| 48 | + "License :: OSI Approved :: Apache Software License", |
| 49 | + "Topic :: Multimedia :: Sound/Audio", |
| 50 | + "Topic :: Multimedia :: Video", |
| 51 | + "Topic :: Scientific/Engineering :: Artificial Intelligence", |
| 52 | + "Programming Language :: Python :: 3", |
| 53 | + "Programming Language :: Python :: 3.9", |
| 54 | + "Programming Language :: Python :: 3.10", |
| 55 | + "Programming Language :: Python :: 3 :: Only", |
| 56 | + ], |
| 57 | + keywords=["webrtc", "realtime", "audio", "video", "livekit"], |
| 58 | + license="Apache-2.0", |
| 59 | + packages=setuptools.find_namespace_packages(include=["livekit.*"]), |
| 60 | + python_requires=">=3.9.0", |
| 61 | + install_requires=["protobuf>=4.25.0", "types-protobuf>=3", "aiofiles>=24", "numpy>=1.26"], |
| 62 | + package_data={ |
| 63 | + "livekit.rtc": ["_proto/*.py", "py.typed", "*.pyi", "**/*.pyi"], |
| 64 | + "livekit.rtc.resources": [ |
| 65 | + "*.so", |
| 66 | + "*.dylib", |
| 67 | + "*.dll", |
| 68 | + "LICENSE.md", |
| 69 | + "*.h", |
| 70 | + "jupyter-html/index.html", |
| 71 | + ], |
| 72 | + }, |
| 73 | + project_urls={ |
| 74 | + "Documentation": "https://docs.livekit.io", |
| 75 | + "Website": "https://livekit.io/", |
| 76 | + "Source": "https://github.com/livekit/python-sdks/", |
| 77 | + }, |
| 78 | +) |
0 commit comments