Files
servo/pyproject.toml
Jonathan Schwender 9069043477 Move ply and WebIDL into script_bindings (#43180)
This is required to publish script_bindings, since all files used during
codegen need to be there.
It might also be possible to generate the bindings ahead of time and
vendor them in-tree, but this seems painful to setup from a CI
perspective.
Since there don't seem to be any other users in-tree we can just vendor
into the script-bindings directory.

`ply` is licensed under the BSD 3 clause, and WebIDL under MPL-2.0, with
the licenses available in our cargo package. Both tools won't end up in
`servo` since they are build-time dependencies, so I believe we don't
need to adjust the crate license, or configure `about.toml`.

Testing: Should be covered by existing tests. We don't test if this
allows vendored builds or published builds.
Fixes: Partial fix for #43145

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-03-12 05:44:46 +00:00

83 lines
1.8 KiB
TOML

[project]
# `uv` logs warnings if this file doesn't contain a `project` table.
name = "servo"
version = "0.0.1"
requires-python = ">=3.11"
dynamic = ["dependencies"]
[tool.setuptools.dynamic.dependencies]
file = ["python/requirements.txt", "tests/wpt/tests/tools/requirements_tests.txt", "tests/wpt/tests/tools/wptrunner/requirements.txt", "tests/wpt/tests/tools/requirements_flake8.txt"]
[tool.setuptools.packages.find]
exclude = ["config*"]
[tool.ruff]
line-length = 120
extend-exclude = [
# temporary local files
"target/**",
"__pycache__/**",
"python/_venv*/**",
# upstream
"third_party/**",
"python/mach/**",
"components/net/**",
"components/shared/**",
"components/script_bindings/third_party/**",
"tests/**",
]
[tool.ruff.lint]
select = [
"E",
"W",
"F",
# Type Annotation
"ANN",
]
ignore = [
# Trailing whitespace; the standard tidy process will enforce no trailing whitespace
"W291",
# 80 character line length; the standard tidy process will enforce line length
"E501",
# allow Any type
"ANN401",
]
[tool.ruff.lint.per-file-ignores]
"etc/**" = ["ANN"]
"**/test.py" = ["ANN"]
"**/*_tests.py" = ["ANN"]
"**/tests/**/*.py" = ["ANN"]
[tool.pyrefly]
search-path = [
"python",
"tests/wpt/tests",
"tests/wpt/tests/tools",
"tests/wpt/tests/tools/wptrunner",
"tests/wpt/tests/tools/wptserve",
"python/mach",
"python/wpt",
"components/script_bindings/third_party/WebIDL",
"components/script_bindings/codegen",
]
project-includes = [
"python/**/*.py",
"components/script_bindings",
"etc/ci/*.py",
]
project-excludes = [
"**/venv/**",
"**/.venv/**",
"tests/wpt/tests/**",
"**/test.py",
"**/*_tests.py",
"**/tests/**",
"python/mach/**/*.py",
"components/script_bindings/third_party/**",
]
[tool.uv]
native-tls = true