From a387a77dc00dedfe52f80a3f9bfc7505345b76bd Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Sun, 15 Nov 2026 23:43:15 -0600 Subject: [PATCH] Names: the package is omnipython-pygraphics The distribution moves to its omnipython name, the repo links follow the renamed repositories, mcuctl replaces mpftp, and PYDEVICES_* settings become OMNIPYTHON_* with no fallback. Workflows call publishing-v26 and the docs build installs omnipython-docs from docs-v0.4.0; both tags come with the shared repository's change. Version bumped to the next pre-release; nothing released. --- .github/workflows/prepare-release.yml | 2 +- .github/workflows/publish-release-packages.yml | 6 +++--- .github/workflows/style.yml | 2 +- .github/workflows/tag-release.yml | 2 +- .../validate-pyscript-filesystem-toml.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 4 ++-- VERSION | 2 +- docs/conf.py | 4 ++-- docs/get-started/install.md | 8 ++++---- docs/guides/load-and-save-images.md | 2 +- docs/how-it-works/benchmarks.md | 2 +- docs/how-it-works/index.md | 2 +- docs/reference/platforms.md | 6 +++--- docs/requirements.txt | 2 +- examples/bmp565_scroll.py | 2 +- examples/bmp565_scroll_sprite.py | 2 +- examples/bmp565_simpletest.py | 2 +- examples/bmp565_sprite.py | 2 +- examples/font_list.py | 2 +- examples/framebuf_simpletest.py | 2 +- examples/graphics_simpletest.py | 2 +- examples/pbm_create_new.py | 2 +- examples/pbm_simpletest.py | 2 +- examples/pygraphics_landscape.py | 2 +- examples/rotations.py | 2 +- lib/pygraphics/README.md | 4 ++-- lib/pygraphics/_files.py | 4 ++-- pyproject.toml | 2 +- scripts/bundle_pyscript_assets.py | 2 +- setup.py | 2 +- src/gfx_module_cpy.c | 4 ++-- src/gfx_module_mp.c | 2 +- src/gfx_png.h | 4 ++-- tests/test_files.py | 2 +- tools/compare_graphics.py | 15 ++------------- tools/compare_graphics_matrix.py | 10 +++++----- tools/test_testpypi_standalone.sh | 6 +++--- 38 files changed, 59 insertions(+), 70 deletions(-) diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 36126aa..c70fb7f 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -15,7 +15,7 @@ permissions: jobs: release-pr: - uses: PyDevices/.github/.github/workflows/reusable-prepare-release-pr.yml@publishing-v13 + uses: PyDevices/.github/.github/workflows/reusable-prepare-release-pr.yml@publishing-v26 with: version: ${{ inputs.version }} secrets: inherit diff --git a/.github/workflows/publish-release-packages.yml b/.github/workflows/publish-release-packages.yml index 0581a59..07c0e08 100644 --- a/.github/workflows/publish-release-packages.yml +++ b/.github/workflows/publish-release-packages.yml @@ -20,11 +20,11 @@ permissions: jobs: publish: - uses: PyDevices/.github/.github/workflows/reusable-publish-release-packages.yml@publishing-v21 + uses: PyDevices/.github/.github/workflows/reusable-publish-release-packages.yml@publishing-v26 with: build-kind: native-and-wasm - distribution-name: pydevices-pygraphics - wheel-filename-prefix: pydevices_pygraphics + distribution-name: omnipython-pygraphics + wheel-filename-prefix: omnipython_pygraphics linux-aarch64: true mip-profile: pygraphics release-ref: ${{ inputs.release-ref }} diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index ab9fc31..0985e7d 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -13,4 +13,4 @@ permissions: jobs: style: - uses: PyDevices/.github/.github/workflows/reusable-style-check.yml@publishing-v20 + uses: PyDevices/.github/.github/workflows/reusable-style-check.yml@publishing-v26 diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index ef43d1d..67399e5 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -12,5 +12,5 @@ permissions: jobs: tag: - uses: PyDevices/.github/.github/workflows/reusable-tag-on-release-merge.yml@publishing-v6 + uses: PyDevices/.github/.github/workflows/reusable-tag-on-release-merge.yml@publishing-v26 secrets: inherit diff --git a/.github/workflows/validate-pyscript-filesystem-toml.yml b/.github/workflows/validate-pyscript-filesystem-toml.yml index e16fc84..b593aaf 100644 --- a/.github/workflows/validate-pyscript-filesystem-toml.yml +++ b/.github/workflows/validate-pyscript-filesystem-toml.yml @@ -18,7 +18,7 @@ permissions: jobs: validate-pyscript-filesystem-toml: - uses: PyDevices/.github/.github/workflows/reusable-validate-pyscript-filesystem-toml.yml@publishing-v6 + uses: PyDevices/.github/.github/workflows/reusable-validate-pyscript-filesystem-toml.yml@publishing-v26 with: config-path: pygraphics.toml source-mappings: lib=/lib diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e0e5088..10b8c19 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -98,7 +98,7 @@ directory to the modules you want. CI builds the unix port of MicroPython MicroPython's [manifest reference](https://docs.micropython.org/en/v1.29.0/reference/manifest.html) has more on `c_module()` and `include()`. -[micropython-pydevices](https://github.com/PyDevices/micropython-pydevices) +[omnipython-builds](https://github.com/PyDevices/omnipython-builds) keeps ready-made manifests and boards for building several PyDevices modules at once. @@ -157,5 +157,5 @@ gradients, text) over bare method lists. ## Releases Each release tag `vX.Y.Z` publishes the compiled wheels to TestPyPI as -`pydevices-pygraphics` and the pure package to the mip index as `pygraphics`, +`omnipython-pygraphics` and the pure package to the mip index as `pygraphics`, both at that version. diff --git a/README.md b/README.md index de9dd18..0ab44ba 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ a framebuffer, with the same code on MicroPython-compatible boards, CircuitPython-compatible boards and CPython. ```bash -pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-pygraphics +pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ omnipython-pygraphics ``` ```python @@ -16,7 +16,7 @@ omip.install("pygraphics") ``` `omip` comes with OmniPython firmware. On other MicroPython firmware, run -`mip.install("github:PyDevices/pydevices/lib/omip.py")` once to put it on the board. +`mip.install("github:PyDevices/omnipython/lib/omip.py")` once to put it on the board. ```python import pygraphics diff --git a/VERSION b/VERSION index c946ee6..34944f7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.6 +0.1.7.dev0 diff --git a/docs/conf.py b/docs/conf.py index 49605ce..34c750b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,7 +5,7 @@ """Sphinx configuration for the pygraphics documentation. Everything shared by the PyDevices documentation projects (theme, top bar, -Markdown and docstring setup, the reference map) comes from pydevices-docs. +Markdown and docstring setup, the reference map) comes from omnipython-docs. The Reference section is written from ``pygraphics.pyi``, the stub that lists every name the compiled module and the pure-Python package share, so the @@ -17,7 +17,7 @@ import sys from pathlib import Path -from pydevices_docs import configure +from omnipython_docs import configure globals().update(configure( "pygraphics", __file__, diff --git a/docs/get-started/install.md b/docs/get-started/install.md index 93f66ff..c1f279c 100644 --- a/docs/get-started/install.md +++ b/docs/get-started/install.md @@ -7,10 +7,10 @@ between them. ## On a desktop (CPython) ```bash -pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-pygraphics +pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ omnipython-pygraphics ``` -The package is called `pydevices-pygraphics` and you import `pygraphics`. +The package is called `omnipython-pygraphics` and you import `pygraphics`. Releases are on TestPyPI for now, which is why the command names it. There are compiled wheels for Linux on x86_64 and ARM64, Windows, Android and Pyodide; [Platforms](../reference/platforms.md) has the list and what to do on a Mac. @@ -25,7 +25,7 @@ omip.install("pygraphics") ``` `omip` comes with OmniPython firmware. On other MicroPython firmware, run -`mip.install("github:PyDevices/pydevices/lib/omip.py")` once to put it on the board. +`mip.install("github:PyDevices/omnipython/lib/omip.py")` once to put it on the board. ## On a CircuitPython-compatible board @@ -36,7 +36,7 @@ Copy the [`lib/pygraphics/`](https://github.com/PyDevices/pygraphics/tree/main/l ```python import micropip -await micropip.install("pydevices-pygraphics", index_urls="https://test.pypi.org/simple/") +await micropip.install("omnipython-pygraphics", index_urls="https://test.pypi.org/simple/") ``` micropip picks the wheel that matches your Pyodide version. diff --git a/docs/guides/load-and-save-images.md b/docs/guides/load-and-save-images.md index ef5c6c0..811c2c1 100644 --- a/docs/guides/load-and-save-images.md +++ b/docs/guides/load-and-save-images.md @@ -24,7 +24,7 @@ list of formats and file types is under [Formats](../reference/formats.md#which- A name ending in `.png` saves an `RGB565`, `GS8` or `MONO_HLSB` picture as PNG. PNG needs the `pngio` module: PyDevices firmware has it built in, and on -CPython it comes with the `pydevices-desktop` package and needs Pillow. +CPython it comes with the `omnipython-desktop` package and needs Pillow. Without it, saving a PNG raises an `ImportError` that says what to install. ## Load a picture diff --git a/docs/how-it-works/benchmarks.md b/docs/how-it-works/benchmarks.md index 968e3e1..1a86490 100644 --- a/docs/how-it-works/benchmarks.md +++ b/docs/how-it-works/benchmarks.md @@ -14,7 +14,7 @@ Milliseconds per call, drawing into a 160 × 128 `RGB565` framebuffer: | `blit`, a 64 × 64 sprite | 0.024 | 3.57 | 0.021 | 4.40 | Measured on one laptop (Intel Core Ultra 7 155H, Linux): CPython 3.12.3 with -pydevices-pygraphics 0.1.1, and MicroPython 1.30 preview unix builds, one +omnipython-pygraphics 0.1.1, and MicroPython 1.30 preview unix builds, one with the compiled module built in and one without. Neither pure run had numpy or ulab to call on. A board is far slower than a laptop; the ratio between the columns is what carries over. diff --git a/docs/how-it-works/index.md b/docs/how-it-works/index.md index a1b14cd..64822cd 100644 --- a/docs/how-it-works/index.md +++ b/docs/how-it-works/index.md @@ -23,7 +23,7 @@ your shapes, text and images The same `import pygraphics` comes in two forms. -The compiled package is C. It's what the `pydevices-pygraphics` wheels +The compiled package is C. It's what the `omnipython-pygraphics` wheels contain, and it can be built into MicroPython or CircuitPython firmware. `pygraphics.implementation()` returns `native_cmod`. diff --git a/docs/reference/platforms.md b/docs/reference/platforms.md index 4a0dfb0..404eba3 100644 --- a/docs/reference/platforms.md +++ b/docs/reference/platforms.md @@ -4,7 +4,7 @@ | Where | Package | How it's tested | |---|---|---| -| CPython 3.11–3.14 on Linux x86_64 (manylinux_2_28) | compiled wheel, `pydevices-pygraphics` | the full tests run on every change, against both packages | +| CPython 3.11–3.14 on Linux x86_64 (manylinux_2_28) | compiled wheel, `omnipython-pygraphics` | the full tests run on every change, against both packages | | CPython 3.11–3.14 on Linux aarch64 (manylinux_2_28), such as 64-bit Raspberry Pi OS | compiled wheel | each release checks the wheel loads its compiled module | | CPython 3.11–3.14 on Windows x86_64 | compiled wheel | each release checks the wheel loads its compiled module | | CPython 3.13–3.14 on Android, arm64-v8a and x86_64 | compiled wheel | the wheel builds; it isn't run on a device | @@ -27,7 +27,7 @@ has the steps. `pygraphics.implementation()` tells you which one you have: Releases go to TestPyPI, which is why the install command names it. PyPI holds one old release, 0.0.37, kept to reserve the name, so -`pip install pydevices-pygraphics` without the TestPyPI index succeeds and +`pip install omnipython-pygraphics` without the TestPyPI index succeeds and gives you that old version. ## Names only the pure-Python package has @@ -50,5 +50,5 @@ the current one. | | Now | Earlier | |---|---|---| | Import | `pygraphics` | `graphics` | -| pip (compiled) | `pydevices-pygraphics` | `pygraphics`, `graphics-cmod` | +| pip (compiled) | `omnipython-pygraphics` | `pygraphics`, `graphics-cmod` | | mip | `pygraphics` | `graphics` | diff --git a/docs/requirements.txt b/docs/requirements.txt index 396f0c3..9ed246d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ # Local preview: use the checkout of .github next to this repository, # pip install -e ../.github/docs-config # Read the Docs and CI install the tagged release: -pydevices-docs @ git+https://github.com/PyDevices/.github@docs-v0.3.1#subdirectory=docs-config +omnipython-docs @ git+https://github.com/PyDevices/.github@docs-v0.4.0#subdirectory=docs-config diff --git a/examples/bmp565_scroll.py b/examples/bmp565_scroll.py index ce67a93..ccbebaf 100644 --- a/examples/bmp565_scroll.py +++ b/examples/bmp565_scroll.py @@ -8,7 +8,7 @@ the whole picture in memory. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, appdev and pygraphics. +package or omnipython-desktop provides, appdev and pygraphics. Run it from the repository's root: python examples/bmp565_scroll.py diff --git a/examples/bmp565_scroll_sprite.py b/examples/bmp565_scroll_sprite.py index 4678713..786b209 100644 --- a/examples/bmp565_scroll_sprite.py +++ b/examples/bmp565_scroll_sprite.py @@ -8,7 +8,7 @@ the bottom left to jump, and the bottom right to shoot. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, appdev and pygraphics. +package or omnipython-desktop provides, appdev and pygraphics. Run it from the repository's root: python examples/bmp565_scroll_sprite.py diff --git a/examples/bmp565_simpletest.py b/examples/bmp565_simpletest.py index d89b8f4..63b3aee 100644 --- a/examples/bmp565_simpletest.py +++ b/examples/bmp565_simpletest.py @@ -9,7 +9,7 @@ bmp565_scroll_sprite.py for reading a picture a line at a time instead. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, and pygraphics. +package or omnipython-desktop provides, and pygraphics. Run it from the repository's root: python examples/bmp565_simpletest.py diff --git a/examples/bmp565_sprite.py b/examples/bmp565_sprite.py index 4952e93..a2edbcd 100644 --- a/examples/bmp565_sprite.py +++ b/examples/bmp565_sprite.py @@ -8,7 +8,7 @@ stopping at the edges. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, appdev and pygraphics. +package or omnipython-desktop provides, appdev and pygraphics. Run it from the repository's root: python examples/bmp565_sprite.py diff --git a/examples/font_list.py b/examples/font_list.py index 99737d7..8fbee34 100644 --- a/examples/font_list.py +++ b/examples/font_list.py @@ -9,7 +9,7 @@ EXPORT to True to also save each font as a .py module. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, and pygraphics. +package or omnipython-desktop provides, and pygraphics. Run it from the repository's root: python examples/font_list.py diff --git a/examples/framebuf_simpletest.py b/examples/framebuf_simpletest.py index 746bdcc..c471ebc 100644 --- a/examples/framebuf_simpletest.py +++ b/examples/framebuf_simpletest.py @@ -9,7 +9,7 @@ memory of its own. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, and pygraphics. +package or omnipython-desktop provides, and pygraphics. Run it from the repository's root: python examples/framebuf_simpletest.py diff --git a/examples/graphics_simpletest.py b/examples/graphics_simpletest.py index 240adc9..f56b10f 100644 --- a/examples/graphics_simpletest.py +++ b/examples/graphics_simpletest.py @@ -8,7 +8,7 @@ the display itself, with colours from palettes. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, and pygraphics, and palettes. +package or omnipython-desktop provides, and pygraphics, and palettes. Run it from the repository's root: python examples/graphics_simpletest.py diff --git a/examples/pbm_create_new.py b/examples/pbm_create_new.py index 2437b57..42b0b52 100644 --- a/examples/pbm_create_new.py +++ b/examples/pbm_create_new.py @@ -8,7 +8,7 @@ display as it is and with its background left transparent. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, and pygraphics. +package or omnipython-desktop provides, and pygraphics. Run it from the repository's root: python examples/pbm_create_new.py diff --git a/examples/pbm_simpletest.py b/examples/pbm_simpletest.py index d55c0bd..9d10773 100644 --- a/examples/pbm_simpletest.py +++ b/examples/pbm_simpletest.py @@ -8,7 +8,7 @@ once with its background left transparent. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, and pygraphics. +package or omnipython-desktop provides, and pygraphics. Run it from the repository's root: python examples/pbm_simpletest.py diff --git a/examples/pygraphics_landscape.py b/examples/pygraphics_landscape.py index d69bb41..600750b 100644 --- a/examples/pygraphics_landscape.py +++ b/examples/pygraphics_landscape.py @@ -9,7 +9,7 @@ copied to the display before the next one. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, appdev and pygraphics, and multimer. +package or omnipython-desktop provides, appdev and pygraphics, and multimer. Run it from the repository's root: python examples/pygraphics_landscape.py diff --git a/examples/rotations.py b/examples/rotations.py index 3310e17..5a1b1fb 100644 --- a/examples/rotations.py +++ b/examples/rotations.py @@ -8,7 +8,7 @@ board_config's rotation settings put the picture the right way up. Needs: a board_config with a display_drv, which a PyDevices board -package or pydevices-desktop provides, appdev and pygraphics, and palettes. +package or omnipython-desktop provides, appdev and pygraphics, and palettes. Run it from the repository's root: python examples/rotations.py diff --git a/lib/pygraphics/README.md b/lib/pygraphics/README.md index a40559f..c78f706 100644 --- a/lib/pygraphics/README.md +++ b/lib/pygraphics/README.md @@ -12,13 +12,13 @@ omip.install("pygraphics") ``` `omip` comes with OmniPython firmware. On other MicroPython firmware, run -`mip.install("github:PyDevices/pydevices/lib/omip.py")` once to put it on the board. +`mip.install("github:PyDevices/omnipython/lib/omip.py")` once to put it on the board. On a CircuitPython-compatible board, copy this folder to `CIRCUITPY/lib/`. On CPython, install the compiled package instead: ```bash -pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-pygraphics +pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ omnipython-pygraphics ``` ```python diff --git a/lib/pygraphics/_files.py b/lib/pygraphics/_files.py index dea6ebf..f8d68b4 100644 --- a/lib/pygraphics/_files.py +++ b/lib/pygraphics/_files.py @@ -78,13 +78,13 @@ def load_image(filename): def _save_png(fb, filename): """PNG through pngio: MicroPython's built-in module, or on CPython - pydevices-desktop's, over Pillow. pygraphics has no PNG encoder of its own.""" + omnipython-desktop's, over Pillow. pygraphics has no PNG encoder of its own.""" try: import pngio except ImportError: raise ImportError( "saving PNG needs pngio: PyDevices MicroPython firmware has it built in; " - "on CPython install pydevices-desktop and Pillow (pip install pillow)" + "on CPython install omnipython-desktop and Pillow (pip install pillow)" ) from None w, h = fb.width, fb.height if fb.format == RGB565: diff --git a/pyproject.toml b/pyproject.toml index a2bd22b..07b1b89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61"] build-backend = "setuptools.build_meta" [project] -name = "pydevices-pygraphics" +name = "omnipython-pygraphics" dynamic = ["version"] description = "Native graphics cmod for CPython (FrameBuffer, Area); import as pygraphics" readme = "README.md" diff --git a/scripts/bundle_pyscript_assets.py b/scripts/bundle_pyscript_assets.py index b206a31..1bca268 100644 --- a/scripts/bundle_pyscript_assets.py +++ b/scripts/bundle_pyscript_assets.py @@ -21,7 +21,7 @@ def bundle_assets(repo_root: Path) -> Path: # Known sibling repositories and their library paths workspace_root = repo_root.parent - repos_to_bundle = ["pydevices", "palettes", "pdwidgets", "pygraphics"] + repos_to_bundle = ["omnipython", "palettes", "pdwidgets", "pygraphics"] print(f"Bundling PyDevices packages into {bundle_zip}...") with zipfile.ZipFile(bundle_zip, "w", zipfile.ZIP_DEFLATED) as zf: diff --git a/setup.py b/setup.py index 03bd538..899c047 100644 --- a/setup.py +++ b/setup.py @@ -77,7 +77,7 @@ def run(self): setup( - name="pydevices-pygraphics", + name="omnipython-pygraphics", packages=[], cmdclass={"build_ext": build_ext_with_stub}, py_modules=[], diff --git a/src/gfx_module_cpy.c b/src/gfx_module_cpy.c index 56afcb2..9d8cf6d 100644 --- a/src/gfx_module_cpy.c +++ b/src/gfx_module_cpy.c @@ -1211,7 +1211,7 @@ static PyObject *framebuffer_scroll(GfxFrameBufferObject *self, PyObject *args) return area_from_gfx(&area); } -/* Save fb to path: PNG through pngio (pydevices-desktop's, over Pillow) for a +/* Save fb to path: PNG through pngio (omnipython-desktop's, over Pillow) for a * ".png" name or an RGB888 framebuffer, the rest through gfx_files.c. NULL on * failure, with the error set. */ static PyObject *cpy_save(const gfx_fb_t *fb, const char *path) { @@ -1248,7 +1248,7 @@ static PyObject *cpy_save(const gfx_fb_t *fb, const char *path) { gfx_png_release(owned); if (PyErr_ExceptionMatches(PyExc_ImportError)) { PyErr_SetString(PyExc_ImportError, - "saving PNG needs pngio: install pydevices-desktop and Pillow (pip install pillow)"); + "saving PNG needs pngio: install omnipython-desktop and Pillow (pip install pillow)"); } return NULL; } diff --git a/src/gfx_module_mp.c b/src/gfx_module_mp.c index 97b1dd2..a9de028 100644 --- a/src/gfx_module_mp.c +++ b/src/gfx_module_mp.c @@ -175,7 +175,7 @@ static mp_obj_t gfxmp_png_bytes(const gfx_fb_t *fb) { } else { gfx_png_release(owned); if (mp_obj_exception_match(MP_OBJ_FROM_PTR(nlr.ret_val), MP_OBJ_FROM_PTR(&mp_type_ImportError))) { - mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("saving PNG needs pngio (micropython-pydevices modules/pngio)")); + mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("saving PNG needs pngio (omnipython-builds modules/pngio)")); } nlr_jump(nlr.ret_val); } diff --git a/src/gfx_png.h b/src/gfx_png.h index 0688488..c11dec3 100644 --- a/src/gfx_png.h +++ b/src/gfx_png.h @@ -5,8 +5,8 @@ #include #include -/* pygraphics has no PNG encoder: PNG is pngio's (micropython-pydevices' - * modules/pngio, or pydevices-desktop's pngio.py over Pillow on CPython). +/* pygraphics has no PNG encoder: PNG is pngio's (omnipython-builds' + * modules/pngio, or omnipython-desktop's pngio.py over Pillow on CPython). * What is here is the rule for when a save is PNG, and the pixels pngio is * handed. */ diff --git a/tests/test_files.py b/tests/test_files.py index 9693fb0..6314e0d 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -216,7 +216,7 @@ def test_bmp565_matches_framebuffer_save(self): def _pngio(): try: - import pngio # noqa: F401 (MicroPython's built-in, or pydevices-desktop's over Pillow) + import pngio # noqa: F401 (MicroPython's built-in, or omnipython-desktop's over Pillow) return True except ImportError: diff --git a/tools/compare_graphics.py b/tools/compare_graphics.py index a8d3604..d558334 100644 --- a/tools/compare_graphics.py +++ b/tools/compare_graphics.py @@ -14,10 +14,7 @@ Pure-Python sources are resolved from (first hit wins): - ``/lib/pygraphics`` (this repo's pure-Python package) -- ``$PYGRAPHICS_LIB/pygraphics`` or ``$PYGRAPHICS_SRC`` (and legacy - ``PYDEVICES_PYGRAPHICS_LIB`` / ``PYDEVICES_GRAPHICS_LIB`` / - ``PYDEVICES_PYGRAPHICS_SRC`` / ``PYDEVICES_GRAPHICS_SRC`` overrides, kept - as a fallback for callers that still set them) +- ``$PYGRAPHICS_LIB/pygraphics`` or ``$PYGRAPHICS_SRC`` Used by ``compare_graphics_run.py`` (single interpreter) and ``compare_graphics_matrix.py`` (all desktop interpreters). @@ -289,15 +286,7 @@ def resolve_python_graphics_src(repo: str) -> str: """Return the pure-Python ``pygraphics`` package directory.""" candidates = [repo + "/lib/pygraphics"] - # Legacy PYDEVICES_* overrides are accepted as a fallback for old callers. - env_keys = ( - "PYGRAPHICS_LIB", - "PYGRAPHICS_SRC", - "PYDEVICES_PYGRAPHICS_LIB", - "PYDEVICES_GRAPHICS_LIB", - "PYDEVICES_PYGRAPHICS_SRC", - "PYDEVICES_GRAPHICS_SRC", - ) + env_keys = ("PYGRAPHICS_LIB", "PYGRAPHICS_SRC") for key in env_keys: override = _env_get(key) if override: diff --git a/tools/compare_graphics_matrix.py b/tools/compare_graphics_matrix.py index 5479619..9fc280c 100644 --- a/tools/compare_graphics_matrix.py +++ b/tools/compare_graphics_matrix.py @@ -9,7 +9,7 @@ python tools/compare_graphics_matrix.py python tools/compare_graphics_matrix.py --only-interpreter micropython,cpython-venv -For ``cpython-venv`` and ``python.exe``, installs ``pydevices-pygraphics`` from TestPyPI +For ``cpython-venv`` and ``python.exe``, installs ``omnipython-pygraphics`` from TestPyPI (first time per interpreter) so ``import pygraphics`` resolves to the native wheel. Results: summary table on stderr, JSON in the system temp directory. @@ -127,7 +127,7 @@ def ensure_graphics_native(python_exe: str, *, verbose: bool) -> tuple[bool, str if impl == "pygraphics_python": if verbose: print( - "Installing pydevices-pygraphics from TestPyPI for {}...".format(python_exe), + "Installing omnipython-pygraphics from TestPyPI for {}...".format(python_exe), file=sys.stderr, ) elif impl: @@ -135,7 +135,7 @@ def ensure_graphics_native(python_exe: str, *, verbose: bool) -> tuple[bool, str else: if verbose: print( - "graphics not importable in {}; installing pydevices-pygraphics...".format(python_exe), + "graphics not importable in {}; installing omnipython-pygraphics...".format(python_exe), file=sys.stderr, ) @@ -151,14 +151,14 @@ def ensure_graphics_native(python_exe: str, *, verbose: bool) -> tuple[bool, str TESTPYPI_INDEX, "--extra-index-url", PYPI_INDEX, - "pydevices-pygraphics", + "omnipython-pygraphics", ] subprocess.run(install, check=True) impl = _graphics_impl(python_exe) if impl != "native_cmod": return False, "pygraphics install failed (implementation={!r})".format(impl) - return True, "installed pydevices-pygraphics from TestPyPI" + return True, "installed omnipython-pygraphics from TestPyPI" def parse_result(stdout: str) -> dict | None: diff --git a/tools/test_testpypi_standalone.sh b/tools/test_testpypi_standalone.sh index 09af964..8158fa5 100755 --- a/tools/test_testpypi_standalone.sh +++ b/tools/test_testpypi_standalone.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Verify the pydevices-pygraphics TestPyPI wheel in an isolated environment. +# Verify the omnipython-pygraphics TestPyPI wheel in an isolated environment. set -euo pipefail @@ -23,10 +23,10 @@ python3 -m venv "$VENV" "$VENV/bin/pip" install \ --index-url "$TESTPYPI_INDEX" \ --extra-index-url "$PYPI_INDEX" \ - pydevices-pygraphics + omnipython-pygraphics "$VENV/bin/pip" freeze | sort "$VENV/bin/python" -c \ "import pygraphics; print('pygraphics', pygraphics.implementation())" -echo "Standalone pydevices-pygraphics TestPyPI smoke test passed." +echo "Standalone omnipython-pygraphics TestPyPI smoke test passed."