Skip to content

Commit 9ad375c

Browse files
committed
fix(ci): exclude pip/setuptools from license inventory to prevent version drift
generate_license_list.py was including pip itself in the output. pip version differs between CI and local environments (25.1.1 vs 26.0.1), causing the license check to fail with every pip upgrade in either environment. Exclude pip, setuptools, wheel, and distribute — they are installer infrastructure, not project dependencies. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_018NsdPH4dcsbTWeTFuTgswY
1 parent 8e3198f commit 9ad375c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

docs/licenses.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Generated from installed Python package metadata. Re-run with `python scripts/ge
5050
| omegaconf | 2.3.1 | UNKNOWN | https://github.com/omry/omegaconf |
5151
| packaging | 26.2 | Apache-2.0 OR BSD-2-Clause | UNKNOWN |
5252
| pathspec | 1.1.1 | UNKNOWN | UNKNOWN |
53-
| pip | 26.0.1 | MIT | UNKNOWN |
5453
| platformdirs | 4.10.0 | MIT | UNKNOWN |
5554
| pluggy | 1.6.0 | MIT | UNKNOWN |
5655
| postgrest | 2.31.0 | MIT | UNKNOWN |

scripts/generate_license_list.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ def field(meta: metadata.PackageMetadata, name: str) -> str:
1717
return compact or "UNKNOWN"
1818

1919

20+
_INFRA_PACKAGES = frozenset({"pip", "setuptools", "wheel", "distribute"})
21+
22+
2023
def main() -> int:
2124
rows = []
2225
for dist in sorted(metadata.distributions(), key=lambda d: (d.metadata.get("Name") or "").lower()):
2326
meta = dist.metadata
2427
name = field(meta, "Name")
28+
if name.lower() in _INFRA_PACKAGES:
29+
continue
2530
version = dist.version or "UNKNOWN"
2631
license_expr = field(meta, "License-Expression")
2732
license_field = license_expr if license_expr != "UNKNOWN" else field(meta, "License")

0 commit comments

Comments
 (0)