Skip to content

Commit

Permalink
Fix uv path in test script
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Oct 24, 2024
1 parent 65d0524 commit 680abe5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/publish/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def build_new_version(project_name: str, uv: Path) -> Version:
return new_version


def wait_for_index(index_url: str, project_name: str, version: Version):
def wait_for_index(index_url: str, project_name: str, version: Version, uv: Path):
"""Check that the index URL was updated, wait up to 10s if necessary.
Often enough the index takes a few seconds until the index is updated after an
Expand All @@ -168,7 +168,7 @@ def wait_for_index(index_url: str, project_name: str, version: Version):
for _ in range(10):
output = check_output(
[
"uv",
uv,
"pip",
"compile",
"--index",
Expand Down Expand Up @@ -225,7 +225,7 @@ def publish_project(target: str, uv: Path):
if publish_url == TEST_PYPI_PUBLISH_URL:
# Confirm pypi behaviour: Uploading the same file again is fine.
print(f"\n=== 2. Publishing {project_name} {version} again (PyPI) ===")
wait_for_index(index_url, project_name, version)
wait_for_index(index_url, project_name, version, uv)
args = [uv, "publish", "-v", "--publish-url", publish_url, *extra_args]
output = run(
args, cwd=uv_cwd, env=env, text=True, check=True, stderr=PIPE
Expand All @@ -241,7 +241,7 @@ def publish_project(target: str, uv: Path):
)

print(f"\n=== 3. Publishing {project_name} {version} again with skip existing ===")
wait_for_index(index_url, project_name, version)
wait_for_index(index_url, project_name, version, uv)
args = [
uv,
"publish",
Expand Down

0 comments on commit 680abe5

Please sign in to comment.