diff --git a/pyproject.toml b/pyproject.toml index 860007ee..f517d03c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,6 @@ dependencies = [ [project.optional-dependencies] testing = [ - "comma-car-segments @ https://huggingface.co/datasets/commaai/commaCarSegments/resolve/main/dist/comma_car_segments-0.1.0-py3-none-any.whl", "cffi", "tree-sitter", "tree-sitter-c", @@ -33,7 +32,6 @@ testing = [ "lefthook", "cpplint", "codespell", - "cppcheck @ git+https://github.com/commaai/dependencies.git@release-cppcheck#subdirectory=cppcheck", ] docs = [ "Jinja2", @@ -42,6 +40,15 @@ examples = [ "inputs", ] +# Dependency groups (PEP 735) are not included in the published wheel. +# Direct URL dependencies must live here because PyPI rejects uploads whose +# `Requires-Dist` contains direct URLs. +[dependency-groups] +testing = [ + "comma-car-segments @ https://huggingface.co/datasets/commaai/commaCarSegments/resolve/main/dist/comma_car_segments-0.1.0-py3-none-any.whl", + "cppcheck @ git+https://github.com/commaai/dependencies.git@release-cppcheck#subdirectory=cppcheck", +] + [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" diff --git a/setup.sh b/setup.sh index 6966339b..e82a46b4 100755 --- a/setup.sh +++ b/setup.sh @@ -18,5 +18,5 @@ if ! command -v uv &>/dev/null; then fi export UV_PROJECT_ENVIRONMENT="$BASEDIR/.venv" -uv sync --all-extras --inexact +uv sync --all-extras --all-groups --inexact source "$PYTHONPATH/.venv/bin/activate" diff --git a/uv.lock b/uv.lock index 396986b8..2ed43eea 100644 --- a/uv.lock +++ b/uv.lock @@ -401,8 +401,6 @@ examples = [ testing = [ { name = "cffi" }, { name = "codespell" }, - { name = "comma-car-segments" }, - { name = "cppcheck" }, { name = "cpplint" }, { name = "gcovr" }, { name = "hypothesis" }, @@ -415,12 +413,16 @@ testing = [ { name = "zstandard" }, ] +[package.dev-dependencies] +testing = [ + { name = "comma-car-segments" }, + { name = "cppcheck" }, +] + [package.metadata] requires-dist = [ { name = "cffi", marker = "extra == 'testing'" }, { name = "codespell", marker = "extra == 'testing'" }, - { name = "comma-car-segments", marker = "extra == 'testing'", url = "https://huggingface.co/datasets/commaai/commaCarSegments/resolve/main/dist/comma_car_segments-0.1.0-py3-none-any.whl" }, - { name = "cppcheck", marker = "extra == 'testing'", git = "https://github.com/commaai/dependencies.git?subdirectory=cppcheck&rev=release-cppcheck" }, { name = "cpplint", marker = "extra == 'testing'" }, { name = "gcovr", marker = "extra == 'testing'" }, { name = "hypothesis", marker = "extra == 'testing'", specifier = "==6.47.*" }, @@ -440,6 +442,12 @@ requires-dist = [ ] provides-extras = ["testing", "docs", "examples"] +[package.metadata.requires-dev] +testing = [ + { name = "comma-car-segments", url = "https://huggingface.co/datasets/commaai/commaCarSegments/resolve/main/dist/comma_car_segments-0.1.0-py3-none-any.whl" }, + { name = "cppcheck", git = "https://github.com/commaai/dependencies.git?subdirectory=cppcheck&rev=release-cppcheck" }, +] + [[package]] name = "pycapnp" version = "2.1.0"