Skip to content

Commit f888c4a

Browse files
committed
setup uv workspace
1 parent 0307cd1 commit f888c4a

10 files changed

Lines changed: 3671 additions & 33 deletions

File tree

.github/workflows/tests.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,27 @@ jobs:
1818
with:
1919
submodules: true
2020
lfs: true
21+
- name: Install uv
22+
23+
uses: astral-sh/setup-uv@v5
24+
with:
25+
enable-cache: true
26+
cache-dependency-glob: "uv.lock"
27+
28+
- name: Install the project
29+
run: uv sync --all-extras --dev
2130

2231
- uses: actions/setup-python@v6
2332
with:
2433
python-version: '3.13'
34+
2535
- name: Run tests
2636
env:
2737
LIVEKIT_URL: ${{ secrets.LIVEKIT_URL }}
2838
LIVEKIT_API_KEY: ${{ secrets.LIVEKIT_API_KEY }}
2939
LIVEKIT_API_SECRET: ${{ secrets.LIVEKIT_API_SECRET }}
3040
run: |
31-
pip3 install -r dev-requirements.txt
32-
python3 ./livekit-rtc/rust-sdks/download_ffi.py --output livekit-rtc/livekit/rtc/resources
33-
pip3 install ./livekit-protocol ./livekit-api ./livekit-rtc
34-
pytest . --ignore=livekit-rtc/rust-sdks
41+
42+
uv run python ./livekit-rtc/rust-sdks/download_ffi.py --output livekit-rtc/livekit/rtc/resources
43+
uv run pytest . --ignore=livekit-rtc/rust-sdks
3544

dev-requirements.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

livekit-api/pyproject.toml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
[build-system]
2-
requires = [
3-
"setuptools>=42",
4-
]
2+
requires = ["setuptools>=42"]
53
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "livekit-api"
7+
version = "0.8.0"
8+
description = "Python Server API for LiveKit"
9+
readme = "README.md"
10+
requires-python = ">=3.9.0"
11+
license = "Apache-2.0"
12+
keywords = ["webrtc", "realtime", "audio", "video", "livekit"]
13+
authors = [
14+
{ name = "LiveKit", email = "support@livekit.io" }
15+
]
16+
classifiers = [
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: Apache Software License",
19+
"Topic :: Multimedia :: Sound/Audio",
20+
"Topic :: Multimedia :: Video",
21+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3 :: Only",
28+
]
29+
dependencies = [
30+
"pyjwt>=2.0.0",
31+
"aiohttp>=3.9.0",
32+
"protobuf>=4",
33+
"types-protobuf>=4",
34+
"livekit-protocol>=1.1.1,<2.0.0",
35+
]
36+
37+
[project.urls]
38+
Documentation = "https://docs.livekit.io"
39+
Website = "https://livekit.io/"
40+
Source = "https://github.com/livekit/python-sdks/"
41+
42+
[tool.uv.sources]
43+
livekit-protocol = { workspace = true }

livekit-api/setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
url="https://github.com/livekit/python-sdks",
3434
classifiers=[
3535
"Intended Audience :: Developers",
36-
"License :: OSI Approved :: Apache Software License",
3736
"Topic :: Multimedia :: Sound/Audio",
3837
"Topic :: Multimedia :: Video",
3938
"Topic :: Scientific/Engineering :: Artificial Intelligence",
@@ -45,7 +44,6 @@
4544
"Programming Language :: Python :: 3 :: Only",
4645
],
4746
keywords=["webrtc", "realtime", "audio", "video", "livekit"],
48-
license="Apache-2.0",
4947
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
5048
python_requires=">=3.9.0",
5149
install_requires=[

livekit-protocol/pyproject.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[build-system]
2+
requires = ["setuptools>=42"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "livekit-protocol"
7+
version = "1.1.1"
8+
description = "Python protocol stubs for LiveKit"
9+
requires-python = ">=3.7.0"
10+
license = "Apache-2.0"
11+
readme = { content-type = "text/plain", text = "Python protocol stubs for LiveKit" }
12+
keywords = ["webrtc", "realtime", "audio", "video", "livekit"]
13+
authors = [
14+
{ name = "LiveKit", email = "support@livekit.io" }
15+
]
16+
classifiers = [
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: Apache Software License",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.7",
21+
"Programming Language :: Python :: 3.8",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3 :: Only",
25+
]
26+
dependencies = [
27+
"protobuf>=4",
28+
"types-protobuf>=4",
29+
]
30+
31+
[project.urls]
32+
Documentation = "https://docs.livekit.io"
33+
Website = "https://livekit.io/"
34+
Source = "https://github.com/livekit/python-sdks/"

livekit-protocol/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"Programming Language :: Python :: 3 :: Only",
4242
],
4343
keywords=["webrtc", "realtime", "audio", "video", "livekit"],
44-
license="Apache-2.0",
4544
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
4645
python_requires=">=3.7.0",
4746
install_requires=[

livekit-rtc/pyproject.toml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,41 @@
11
[build-system]
2-
requires = [
3-
"setuptools>=42",
4-
"wheel",
5-
"requests",
6-
]
2+
requires = ["setuptools>=42", "wheel", "requests"]
73
build-backend = "setuptools.build_meta"
84

5+
[project]
6+
name = "livekit"
7+
version = "0.16.8"
8+
description = "Python Real-time SDK for LiveKit"
9+
readme = "README.md"
10+
requires-python = ">=3.9.0"
11+
license = "Apache-2.0"
12+
keywords = ["webrtc", "realtime", "audio", "video", "livekit"]
13+
authors = [
14+
{ name = "LiveKit", email = "support@livekit.io" }
15+
]
16+
classifiers = [
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: Apache Software License",
19+
"Topic :: Multimedia :: Sound/Audio",
20+
"Topic :: Multimedia :: Video",
21+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.9",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3 :: Only",
26+
]
27+
dependencies = [
28+
"protobuf>=4.25.0",
29+
"types-protobuf>=3",
30+
"aiofiles>=24",
31+
"numpy>=1.26",
32+
]
33+
34+
[project.urls]
35+
Documentation = "https://docs.livekit.io"
36+
Website = "https://livekit.io/"
37+
Source = "https://github.com/livekit/python-sdks/"
38+
939
[tool.cibuildwheel]
1040
build = "cp39-*"
1141
skip = "*-musllinux_*" # not supported (libwebrtc is using glibc)

livekit-rtc/setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def finalize_options(self):
4545
},
4646
classifiers=[
4747
"Intended Audience :: Developers",
48-
"License :: OSI Approved :: Apache Software License",
4948
"Topic :: Multimedia :: Sound/Audio",
5049
"Topic :: Multimedia :: Video",
5150
"Topic :: Scientific/Engineering :: Artificial Intelligence",
@@ -55,7 +54,6 @@ def finalize_options(self):
5554
"Programming Language :: Python :: 3 :: Only",
5655
],
5756
keywords=["webrtc", "realtime", "audio", "video", "livekit"],
58-
license="Apache-2.0",
5957
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
6058
python_requires=">=3.9.0",
6159
install_requires=["protobuf>=4.25.0", "types-protobuf>=3", "aiofiles>=24", "numpy>=1.26"],

pyproject.toml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[project]
2+
name = "python-sdks"
3+
version = "0.1.0"
4+
description = "LiveKit Python SDKs monorepo"
5+
requires-python = ">=3.9"
6+
dependencies = []
7+
8+
[tool.uv.workspace]
9+
members = ["livekit-rtc", "livekit-api", "livekit-protocol"]
10+
11+
[tool.uv.sources]
12+
livekit = { workspace = true }
13+
livekit-api = { workspace = true }
14+
livekit-protocol = { workspace = true }
15+
16+
[tool.uv]
17+
dev-dependencies = [
18+
# Linting and type checking
19+
"ruff>=0.8.5",
20+
"mypy>=1.13.0",
21+
# Testing
22+
"pytest>=8.3.4",
23+
"pytest-asyncio>=0.24.0",
24+
# Build and packaging
25+
"requests",
26+
"wheel",
27+
"setuptools",
28+
"twine",
29+
"auditwheel; sys_platform == 'linux'",
30+
"cibuildwheel",
31+
# Additional dependencies
32+
"matplotlib",
33+
"pydantic",
34+
"numpy",
35+
]
36+
37+
[tool.ruff]
38+
line-length = 100
39+
target-version = "py39"
40+
exclude = [".github"]
41+
42+
[tool.ruff.lint]
43+
select = [
44+
"E", # pycodestyle errors
45+
"W", # pycodestyle warnings
46+
"F", # pyflakes
47+
"I", # isort
48+
"B", # flake8-bugbear
49+
"C4", # flake8-comprehensions
50+
"UP", # pyupgrade
51+
]
52+
ignore = ["E501"]
53+
54+
[tool.ruff.lint.isort]
55+
combine-as-imports = true
56+
known-first-party = ["livekit"]
57+
58+
[tool.ruff.lint.pydocstyle]
59+
convention = "google"
60+
61+
62+
[tool.pytest.ini_options]
63+
asyncio_mode = "auto"
64+
asyncio_default_fixture_loop_scope = "function"
65+
addopts = ["--import-mode=importlib", "--ignore=examples"]
66+
67+
68+
[tool.mypy]
69+
strict = true
70+
disallow_any_generics = false
71+
plugins = ["pydantic.mypy"]

0 commit comments

Comments
 (0)