Use same version for anki-release; publish to main index

This commit is contained in:
Damien Elmes 2025-06-20 00:45:30 +07:00
parent a60a955c61
commit 4abc0eb8b8
4 changed files with 10 additions and 15 deletions

View file

@ -62,6 +62,9 @@ conflicts = [
],
]
[tool.uv.sources]
anki = { workspace = true }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

View file

@ -1,7 +1,5 @@
#!/bin/bash
export UV_PUBLISH_TOKEN=$(pass show w/pypi-api-test)
# Get the project root (two levels up from qt/release)
PROJ_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
@ -10,4 +8,6 @@ UV="$PROJ_ROOT/out/extracted/uv/uv"
rm -rf dist
"$UV" build --wheel
"$UV" publish --index testpypi
#UV_PUBLISH_TOKEN=$(pass show w/pypi-api-test) "$UV" publish --index testpypi
UV_PUBLISH_TOKEN=$(pass show w/pypi-api) "$UV" publish

View file

@ -13,8 +13,8 @@ PROJ_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
# Use extracted uv binary
UV="$PROJ_ROOT/out/extracted/uv/uv"
# Prompt for wheel version
read -p "Wheel version: " VERSION
# Read version from .version file
VERSION=$(cat "$PROJ_ROOT/.version" | tr -d '[:space:]')
# Copy existing pyproject.toml to .old if it exists
if [ -f pyproject.toml ]; then
@ -24,7 +24,7 @@ fi
# Export dependencies using uv
echo "Exporting dependencies..."
rm -f pyproject.toml
DEPS=$("$UV" export --no-hashes --no-annotate --no-header --extra audio --extra qt --all-packages --no-dev --no-emit-workspace)
DEPS=$(cd "$PROJ_ROOT" && "$UV" export --no-hashes --no-annotate --no-header --extra audio --extra qt --all-packages --no-dev --no-emit-workspace)
# Generate the pyproject.toml file
cat > pyproject.toml << EOF
@ -49,12 +49,6 @@ done
cat >> pyproject.toml << 'EOF'
]
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

View file

@ -48,7 +48,6 @@ wheels = [
[[package]]
name = "anki"
version = "0.1.2"
source = { editable = "pylib" }
dependencies = [
{ name = "beautifulsoup4" },
@ -151,7 +150,6 @@ wheels = [
[[package]]
name = "aqt"
version = "0.1.2"
source = { editable = "qt" }
dependencies = [
{ name = "anki-mac-helper", marker = "sys_platform == 'darwin' or (extra == 'extra-3-aqt-qt' and extra == 'extra-3-aqt-qt66') or (extra == 'extra-3-aqt-qt' and extra == 'extra-3-aqt-qt67') or (extra == 'extra-3-aqt-qt66' and extra == 'extra-3-aqt-qt67')" },
@ -246,7 +244,7 @@ requires-dist = [
{ name = "types-waitress" },
{ name = "waitress", specifier = ">=2.0.0" },
]
provides-extras = ["audio", "qt66", "qt67", "qt"]
provides-extras = ["audio", "qt", "qt66", "qt67"]
[[package]]
name = "astroid"