packaging: move direct-URL deps to dependency-groups (#3348)

PyPI rejects wheel uploads whose Requires-Dist entries contain direct URLs,
which was blocking the 0.3.0 release with a 400 Bad Request. Move
comma-car-segments and cppcheck from [project.optional-dependencies].testing
to a PEP 735 [dependency-groups].testing — groups are not published in the
wheel. Update setup.sh to install them via --all-groups.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Shane Smiskol
2026-04-22 00:33:28 -07:00
committed by GitHub
parent 7d40d89089
commit b69cb4d030
3 changed files with 22 additions and 7 deletions

View File

@@ -18,7 +18,6 @@ dependencies = [
[project.optional-dependencies] [project.optional-dependencies]
testing = [ testing = [
"comma-car-segments @ https://huggingface.co/datasets/commaai/commaCarSegments/resolve/main/dist/comma_car_segments-0.1.0-py3-none-any.whl",
"cffi", "cffi",
"tree-sitter", "tree-sitter",
"tree-sitter-c", "tree-sitter-c",
@@ -33,7 +32,6 @@ testing = [
"lefthook", "lefthook",
"cpplint", "cpplint",
"codespell", "codespell",
"cppcheck @ git+https://github.com/commaai/dependencies.git@release-cppcheck#subdirectory=cppcheck",
] ]
docs = [ docs = [
"Jinja2", "Jinja2",
@@ -42,6 +40,15 @@ examples = [
"inputs", "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] [build-system]
requires = ["setuptools"] requires = ["setuptools"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"

View File

@@ -18,5 +18,5 @@ if ! command -v uv &>/dev/null; then
fi fi
export UV_PROJECT_ENVIRONMENT="$BASEDIR/.venv" export UV_PROJECT_ENVIRONMENT="$BASEDIR/.venv"
uv sync --all-extras --inexact uv sync --all-extras --all-groups --inexact
source "$PYTHONPATH/.venv/bin/activate" source "$PYTHONPATH/.venv/bin/activate"

16
uv.lock generated
View File

@@ -401,8 +401,6 @@ examples = [
testing = [ testing = [
{ name = "cffi" }, { name = "cffi" },
{ name = "codespell" }, { name = "codespell" },
{ name = "comma-car-segments" },
{ name = "cppcheck" },
{ name = "cpplint" }, { name = "cpplint" },
{ name = "gcovr" }, { name = "gcovr" },
{ name = "hypothesis" }, { name = "hypothesis" },
@@ -415,12 +413,16 @@ testing = [
{ name = "zstandard" }, { name = "zstandard" },
] ]
[package.dev-dependencies]
testing = [
{ name = "comma-car-segments" },
{ name = "cppcheck" },
]
[package.metadata] [package.metadata]
requires-dist = [ requires-dist = [
{ name = "cffi", marker = "extra == 'testing'" }, { name = "cffi", marker = "extra == 'testing'" },
{ name = "codespell", 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 = "cpplint", marker = "extra == 'testing'" },
{ name = "gcovr", marker = "extra == 'testing'" }, { name = "gcovr", marker = "extra == 'testing'" },
{ name = "hypothesis", marker = "extra == 'testing'", specifier = "==6.47.*" }, { name = "hypothesis", marker = "extra == 'testing'", specifier = "==6.47.*" },
@@ -440,6 +442,12 @@ requires-dist = [
] ]
provides-extras = ["testing", "docs", "examples"] 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]] [[package]]
name = "pycapnp" name = "pycapnp"
version = "2.1.0" version = "2.1.0"