Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
98 lines (86 loc) · 3.55 KB
/
Copy pathpyproject.toml
File metadata and controls
98 lines (86 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[build-system]
requires = ["maturin>=1.14.1,<2.0"]
build-backend = "maturin"
[project]
name = "moq-ffi"
# Version is injected at build time from the moq-ffi-v* tag (see
# .github/workflows/release-py-ffi.yml). For local dev `maturin develop`
# reads it from rs/moq-ffi/Cargo.toml.
dynamic = ["version"]
description = "Raw UniFFI bindings for the Media over QUIC Rust crates. Most callers want the ergonomic `moq` wrapper instead."
readme = "py/moq-ffi/README.md"
license = "MIT OR Apache-2.0"
requires-python = ">=3.10"
authors = [{ name = "Luke Curley", email = "kixelated@gmail.com" }]
keywords = ["quic", "http3", "webtransport", "media", "live", "streaming"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
]
[project.urls]
Homepage = "https://github.com/moq-dev/moq"
Repository = "https://github.com/moq-dev/moq"
# Maturin builds the rs/moq-ffi crate, runs uniffi-bindgen, and packages
# the cdylib + generated bindings as a private `moq_ffi._uniffi` subpackage
# (the leading underscore signals "internal"; moq_ffi/__init__.py re-exports
# the raw classes). The ergonomic `moq` wrapper depends on this package and
# is versioned independently.
[tool.maturin]
bindings = "uniffi"
manifest-path = "rs/moq-ffi/Cargo.toml"
# The OpenH264 software fallback is opt-in in Rust; the wheel ships it.
features = ["openh264"]
python-source = "py/moq-ffi"
module-name = "moq_ffi._uniffi"
# Cargo resolves disabled optional path dependencies too, while Maturin only
# follows enabled features. Include the Rust workspace so new optional crates
# and the UniFFI generator are available when installing from source.
include = [{ path = "rs/**/*", format = "sdist" }]
# `maturin develop` writes the bindings into the source tree, where a later wheel build
# would pick them up again and fail on the duplicate. The build regenerates them anyway.
exclude = [
"**/moq_ffi/_uniffi/**",
"**/__pycache__/**",
{ path = "**/target/**", format = "sdist" },
# Media fixtures are only read by Rust tests, not source installs.
{ path = "**/test_data/**", format = "sdist" },
]
# Listed explicitly (not `py/*`) so build output like py/dist isn't mistaken
# for a workspace member.
[tool.uv.workspace]
members = ["py/moq-rs"]
[dependency-groups]
dev = ["ruff", "maturin", "pyright", "pytest", "pytest-asyncio"]
docs = ["furo>=2025.12.19", "myst-parser>=5.1.0", "sphinx>=9.1.0"]
# `just py audit` checks the resolved lock against the advisory database.
audit = ["pip-audit>=2.10.1"]
[tool.uv]
build-constraint-dependencies = ["hatchling==1.32.0", "maturin==1.14.1"]
[tool.uv.dependency-groups]
docs = { requires-python = ">=3.12" }
# Tests span the native package and wrapper under py/. pytest resolves
# its rootdir to this workspace root, so the shared asyncio config lives here.
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.pyright]
reportUnnecessaryTypeIgnoreComment = "error"
pythonVersion = "3.10"
include = ["py"]
# The tests import their test clock as a sibling module.
extraPaths = ["py/moq-rs/tests"]
# Skip uniffi-bindgen output: it's regenerated on every build and isn't
# expected to pass our type checks.
exclude = ["**/_uniffi"]
[tool.ruff]
line-length = 120
target-version = "py310"
# Skip uniffi-bindgen output (regenerated on every build).
extend-exclude = ["**/_uniffi"]
[tool.ruff.lint]
# RUF100 fails a `noqa` that no longer suppresses anything.
select = ["E", "F", "W", "I", "RUF100"]
[tool.ruff.format]
quote-style = "double"