Skip to content

Commit bb6f3c9

Browse files
authored
Update lock-dependencies to scrub CDN references (#392)
This PR updates the `lock-dependencies` target so that it also scrubs mirror information from the `url = ` references: these refer to the PyPI CDN. This change is needed because some mirrors/proxies also rewrite the CDN URLs: without this change `uv.lock` refers to environment-specific URLs instead of PyPi. In addition to the `Makefile` changes, the locks have been refreshed.
1 parent ad453e7 commit bb6f3c9

2 files changed

Lines changed: 690 additions & 705 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ lock-dependencies:
4848
$(UV_RUN) --group yq tomlq -r '.["build-system"].requires[]' pyproject.toml | \
4949
uv pip compile --upgrade --generate-hashes --universal --no-header --quiet - > build-constraints-new.txt
5050
mv build-constraints-new.txt .build-constraints.txt
51-
@perl -pi -e 's|registry = "https://[^"]*"|registry = "https://pypi.org/simple"|g' uv.lock
51+
@perl -pi \
52+
-e 's|registry = "https://[^"]*"|registry = "https://pypi.org/simple"|g;' \
53+
-e 's|url = "https://[^"]*/packages/([^"]*)"|url = "https://files.pythonhosted.org/packages/$$1"|g;' \
54+
uv.lock
5255
@printf 'Stripped registry references from uv.lock.\n'
5356

5457
.DEFAULT: all

0 commit comments

Comments
 (0)