Publish wheels on testpypi for testing

This commit is contained in:
Damien Elmes 2025-06-15 11:08:28 +07:00
parent 5afb78c9f0
commit 5fe17fb563
7 changed files with 28 additions and 3 deletions

View file

@ -1,6 +1,7 @@
[project]
name = "anki"
dynamic = ["version"]
# dynamic = ["version"]
version = "0.1.2"
requires-python = ">=3.9"
license = "AGPL-3.0-or-later"
dependencies = [

View file

@ -28,3 +28,9 @@ sphinx = [
[tool.uv.workspace]
members = ["pylib", "qt"]
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

View file

@ -52,3 +52,5 @@ def first_run_setup() -> None:
_dot()
cmd[0] = audio_pkg_path / cmd_name
subprocess.run(cmd, check=True, capture_output=True)
print()

View file

@ -5,10 +5,15 @@ description = "UV-based launcher for Anki."
requires-python = ">=3.9"
dependencies = [
"anki-release",
# so we can use testpypi
"anki",
"aqt",
]
[tool.uv.sources]
anki-release = { index = "testpypi" }
anki = { index = "testpypi" }
aqt = { index = "testpypi" }
[[tool.uv.index]]
name = "testpypi"

View file

@ -1,6 +1,7 @@
[project]
name = "aqt"
dynamic = ["version"]
# dynamic = ["version"]
version = "0.1.2"
requires-python = ">=3.9"
license = "AGPL-3.0-or-later"
dependencies = [

View file

@ -1,5 +1,6 @@
#!/bin/bash
set -e
RELEASE=1 ./ninja wheels
rm -rf out/wheels/*
RELEASE=2 ./ninja wheels
echo "wheels are in out/wheels"

9
tools/publish Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
set -e
./tools/build
export UV_PUBLISH_TOKEN=$(pass show w/pypi-api-test)
out/extracted/uv/uv publish --index testpypi out/wheels/*