From 6aeb10dfc06bca932cf1dc651a4e5e073a4f39ec Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 26 Jul 2026 12:41:04 +0000 Subject: [PATCH] Rename pure-Python TestPyPI project to pydisplay-graphics. graphics-py normalizes to the same pip name as pypi.org's graphics.py (Zelle), so two-index installs can pull the wrong package. Reclaim the historical pydisplay-graphics name; next dual release is v0.0.25. --- .github/workflows/publish-micropython-lib.yml | 6 +++--- AGENTS.md | 4 ++-- PUBLISHING.md | 14 +++++++++----- README.md | 4 ++-- lib/graphics/README.md | 6 +++--- lib/pyproject.toml | 4 ++-- scripts/publish_micropython_lib.sh | 2 +- 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish-micropython-lib.yml b/.github/workflows/publish-micropython-lib.yml index adacee5..3e8e2fe 100644 --- a/.github/workflows/publish-micropython-lib.yml +++ b/.github/workflows/publish-micropython-lib.yml @@ -1,4 +1,4 @@ -# Publish pure-Python graphics to micropython-lib, MIP index, and TestPyPI (graphics-py). +# Publish pure-Python graphics to micropython-lib, MIP index, and TestPyPI (pydisplay-graphics). # Native graphics-cmod wheels are published by publish-testpypi.yml on the same tag. # # Release trigger: push tag vX.Y.Z (see scripts/publish_release_tag.sh). @@ -24,7 +24,7 @@ on: type: boolean default: true upload_testpypi: - description: Upload graphics-py wheels to TestPyPI + description: Upload pydisplay-graphics wheels to TestPyPI type: boolean default: false publish_mip_index: @@ -81,7 +81,7 @@ jobs: VERSION="$(normalize "$TAG")" fi echo "version=$VERSION" >> "$GITHUB_OUTPUT" - echo "Publishing graphics-py / MIP release $VERSION" + echo "Publishing pydisplay-graphics / MIP release $VERSION" - name: Verify publish secrets env: diff --git a/AGENTS.md b/AGENTS.md index 72394e1..5997f3e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Native and pure-Python **graphics** (`import graphics`) for MicroPython, CircuitPython, and CPython. Prefer `graphics-cmod` on desktop/Android when -available; otherwise `graphics-py` / MIP `graphics`. +available; otherwise `pydisplay-graphics` / MIP `graphics`. ## Layout @@ -33,7 +33,7 @@ PYTHONPATH=lib .venv/bin/python -c "import graphics; assert graphics.implementat One tag `vX.Y.Z` publishes: 1. **graphics-cmod** — `publish-testpypi.yml` (cibuildwheel) -2. **graphics-py** + MIP — `publish-micropython-lib.yml` (micropython-lib + TestPyPI + gh-pages) +2. **pydisplay-graphics** + MIP — `publish-micropython-lib.yml` (micropython-lib + TestPyPI + gh-pages) See `PUBLISHING.md`. Next shared version continues the `graphics-cmod` line (`v0.0.9` → `v0.0.10`). diff --git a/PUBLISHING.md b/PUBLISHING.md index 7022ee2..13edcf2 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -5,7 +5,7 @@ One annotated tag `vX.Y.Z` publishes **both** products at that version: | Product | Channel | Workflow | |---------|---------|----------| | **graphics-cmod** | TestPyPI (platform wheels) | `publish-testpypi.yml` | -| **graphics-py** | TestPyPI (pure Python) + micropython-lib / MIP | `publish-micropython-lib.yml` | +| **pydisplay-graphics** | TestPyPI (pure Python) + micropython-lib / MIP | `publish-micropython-lib.yml` | ## Pipeline @@ -18,25 +18,29 @@ graphics (commit on main) │ └─► publish-micropython-lib.yml sync → micropython/graphics/ - hatch + twine → graphics-py + hatch + twine → pydisplay-graphics rebuild mip/PyDevices → gh-pages remove legacy micropython/pydisplay/graphics/ ``` ## Version numbers -Continue the **graphics-cmod** line (`v0.0.9` → `v0.0.10`, …). Preview: +Shared tag for **both** products. After reclaiming the historical +`pydisplay-graphics` TestPyPI line (last `0.0.24` from pydisplay), the next +release is **`v0.0.25`** (not `v0.0.11`). Later tags continue from the highest +`v*` tag: ```bash ./scripts/next_release_version.sh --verbose ./scripts/publish_release_tag.sh --dry-run +# first reclaim: ./scripts/publish_release_tag.sh 0.0.25 --push ``` ## Secrets | Secret | Purpose | |--------|---------| -| `TESTPYPI_API_TOKEN` | TestPyPI upload (cmod + graphics-py) | +| `TESTPYPI_API_TOKEN` | TestPyPI upload (cmod + pydisplay-graphics) | | `MICROPYTHON_LIB_DEPLOY_TOKEN` | PAT with `contents:write` on PyDevices/micropython-lib | Grant both secrets to the **graphics** repository (org secret repository access). @@ -48,7 +52,7 @@ Grant both secrets to the **graphics** repository (org secret repository access) pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ graphics-cmod # pure Python -pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ graphics-py +pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydisplay-graphics ``` ```python diff --git a/README.md b/README.md index 6f1b59b..7e4cc28 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Import as `graphics`. | Product | Pip / MIP | Role | |---------|-----------|------| | **graphics-cmod** | TestPyPI `graphics-cmod` | All-C extension (prefer on desktop/Android when available) | -| **graphics-py** | TestPyPI `graphics-py`, MIP `graphics` | Pure-Python package (same public API) | +| **pydisplay-graphics** | TestPyPI `pydisplay-graphics`, MIP `graphics` | Pure-Python package (same public API) | One release tag `vX.Y.Z` publishes both products at that version. @@ -27,7 +27,7 @@ pip install \ pip install \ -i https://test.pypi.org/simple/ \ --extra-index-url https://pypi.org/simple/ \ - graphics-py + pydisplay-graphics ``` ### MicroPython (MIP) diff --git a/lib/graphics/README.md b/lib/graphics/README.md index 74bce6f..689464c 100644 --- a/lib/graphics/README.md +++ b/lib/graphics/README.md @@ -1,9 +1,9 @@ -# graphics-py +# pydisplay-graphics Pure-Python `graphics` package — `FrameBuffer`, `Draw`, fonts, shapes, and image loaders. Import as `graphics`. -> **Pip name:** `graphics-py` · **Import:** `import graphics` +> **Pip name:** `pydisplay-graphics` · **Import:** `import graphics` On desktop/Android when a native wheel is available, prefer [`graphics-cmod`](https://test.pypi.org/project/graphics-cmod/) (same import @@ -18,7 +18,7 @@ the same release tag / version. pip install \ -i https://test.pypi.org/simple/ \ --extra-index-url https://pypi.org/simple/ \ - graphics-py + pydisplay-graphics ``` ### MicroPython (MIP) diff --git a/lib/pyproject.toml b/lib/pyproject.toml index 0ff6fb3..a06d6b8 100644 --- a/lib/pyproject.toml +++ b/lib/pyproject.toml @@ -3,8 +3,8 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "graphics-py" -version = "0.0.10" +name = "pydisplay-graphics" +version = "0.0.25" description = "Pure-Python graphics (FrameBuffer, Draw, fonts); import as graphics" readme = "graphics/README.md" license = "MIT" diff --git a/scripts/publish_micropython_lib.sh b/scripts/publish_micropython_lib.sh index ad51827..7c4456f 100755 --- a/scripts/publish_micropython_lib.sh +++ b/scripts/publish_micropython_lib.sh @@ -87,7 +87,7 @@ DESCRIPTION_PREFIX="graphics" AUTHOR="Brad Barnett " LICENSE="MIT" BASENAME=graphics -PYPI_NAME=graphics-py +PYPI_NAME=pydisplay-graphics DEST_REPO="${MICROPYTHON_LIB_DIR:-$SOURCE_REPO/../micropython-lib}" DEST_REPO="$(cd "$DEST_REPO" 2>/dev/null && pwd || echo "$DEST_REPO")" export MICROPYTHON_LIB_DIR="$DEST_REPO"