Skip to content

Drop Conda, add a jdk4py command, and upgrade to JDK 25.0.5 - #97

Merged
tibdex merged 23 commits into
mainfrom
tibdex/drop-conda
Nov 13, 2026
Merged

tibdex merged 23 commits into
mainfrom
tibdex/drop-conda

Conversation

@tibdex

@tibdex tibdex commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Close #34, close #83.

Almost all users install jdk4py from PyPI, and we want to stop hosting Conda packages in ActiveViam's Artifactory.
Conda users don't need ours anyway: conda-forge and Anaconda already package the JDK as openjdk.

Without Conda, CI and packaging get much simpler, which made room for a few upgrades: locked actions, PyPI attestations, prek, and JDK 25.0.5.

Tip

The commits tell the story one step at a time and are best reviewed individually.

Before merging

  • On PyPI, add a trusted publisher for activeviam/jdk4py with workflow ci.yaml and environment pypi. Keep the old one for now.
  • On GitHub, create the pypi environment with the same protection rules as deployment.

After the first release succeeds

  • Remove the old PyPI trusted publisher (publish.yaml / deployment) and the deployment environment.
  • Delete the CONDA_CHANNEL_TOKEN secret and the CONDA_CHANNEL_URL and CONDA_CHANNEL_USERNAME variables.

tibdex and others added 22 commits November 12, 2026 12:05
Almost all users install jdk4py from PyPI, and we want to stop hosting Conda packages in ActiveViam's Artifactory.
Conda users don't need ours anyway: conda-forge and Anaconda already package the JDK as `openjdk`.

`conda build` was also the only place running pytest on every OS/arch, so the wheel job now runs it instead.
pytest no longer needs to be pinned to match the version `conda build` installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uv 0.11.6 refuses to work alongside the uv 0.13 developers now have, so pin 0.13.7 instead.
`uv.lock` is regenerated from scratch, which upgrades every development dependency.

ruff 0.17 enables the copyright header rule (CPY001) under `select = ["ALL"]`.
This repository has never used copyright headers, so ignore it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Most of the previous layout existed so the Conda and wheel jobs could share one Java runtime.
With only the wheel left, each platform builds the runtime, tests it, and builds the wheel in a single job, so:

- the runtime no longer goes through an artifact between jobs,
- the matrix goes directly on that job instead of on a reusable workflow,
- the three composite actions are inlined.

Pull requests lint, build, and test.
Pushes to `main` only build and publish.

Each runner's platform tag now sits next to it in the matrix instead of being derived in a long expression with an empty fallback.
A new step installs the retagged wheel on the runner, and uv refuses a wheel tagged for another platform, so a wrong pairing fails the build.

The trusted publisher on PyPI is tied to the workflow file name and environment.
Before merging, register `ci.yaml` with the `pypi` environment on PyPI and create that environment on GitHub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every action moves to its latest release.
All the inputs used here still exist in the new major versions.

`actions.lock` is generated by `gh actions-lock` and pins each action, including the ones they use internally, to a commit.
GitHub refuses to run a workflow whose actions don't match it.
Update it with `gh actions-lock`; Dependabot also updates it.

The versions are full tags because the lockfile records whatever ref the workflow names, and setup-uv no longer publishes a floating major tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix the findings of zizmor, a GitHub Actions security linter:

- `actions/checkout` no longer leaves the GitHub token in `.git/config`.
- Jobs get a read-only token by default.
  The publish job keeps `id-token: write` for trusted publishing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`ubuntu-24.04-arm` has been generally available for public repositories since August 2025, and it's free for them.
The larger runner it replaces is billed even on public repositories, and only exists in the ActiveViam organization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tags were copied from numpy's wheels, but what matters is the oldest system the bundled JDK binaries run on.
Every native binary in Temurin 25.0.5 for macOS, on both architectures, requires macOS 11.0.
The old `macosx_10_9_x86_64` tag let pip install jdk4py on macOS 10.9 to 10.15, where the JDK cannot run.

The Linux tags are right: no Temurin 25.0.5 binary needs a glibc newer than 2.17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PyPI shows attestations as each release's provenance: proof that the wheels were built and uploaded by this repository's workflow.
See https://docs.pypi.org/attestations.

`uv publish` uploads attestations but doesn't generate them, so astral-sh/attest-action generates them first, using the trusted publishing identity the job already has.

pypa/gh-action-pypi-publish would do both in one step, but it runs a Docker image pulled by a mutable tag that the actions lockfile cannot cover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prek runs ruff, ty, and prettier for Markdown and YAML, locally as a Git hook (`uv run prek install`) and in CI.
prettier comes from npm with a Node that prek installs itself, so contributors have nothing to install.

prek fails any hook that modifies files, so CI fails with the diff instead of silently reformatting.
That makes `ruff check --exit-non-zero-on-fix` and `ruff format --exit-non-zero-on-format` unnecessary, and `fix = true` moves to `pyproject.toml`.

JSON is left out: the only JSON files are the VS Code settings, which allow trailing commas that prettier would remove.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
License classifiers are deprecated by PEP 639 in favor of `license` and `license-files`.

The expression includes the Classpath Exception because `LICENSE` is OpenJDK's: GPLv2 with that exception.
A plain `GPL-2.0-only` would leave out the exception that makes embedding the JDK possible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The contact email changed.
- The package ships `py.typed`, so it's `Typing :: Typed`.
- The package ships a Java runtime, so it's also `Programming Language :: Java`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`ADDED_MODULES` and `INCLUDED_LOCALES` are only used to build the runtime and by the tests, yet every wheel shipped them.
Nothing in the ActiveViam organization imports them.

The runtime itself reports what it contains, more accurately than these lists, since jlink also pulls in dependencies and related locales:

- `java --list-modules` lists its modules.
- `java -XshowSettings:locale -version` lists its available locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Type checkers then reject any reassignment.
The four-way unpacking in `__init__.py` stays unannotated because Python has no syntax to annotate unpacked names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`java -version` writes to stderr, but the failure message printed stdout, which is always empty.
For example, with `JAVA_TOOL_OPTIONS` set, the JVM prints a `Picked up JAVA_TOOL_OPTIONS` line first and the test failed with an empty "Unexpected output:" message.
The pattern and the message now read the same variable so they cannot drift apart again.

Also drop a redundant `isinstance` assertion and slice before converting instead of building a list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JVM options must come before `-jar`: anything after the JAR is passed to the program, not the JVM.
`HelloWorld.jar` also prints `Hello, World`, without an exclamation mark, and the REPL shows strings with single quotes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pytest 9's `strict` turns on all of its strictness options at once, such as failing on unknown configuration keys and unregistered markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`run(..., check=True)` is the recommended API and is what the tests already use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing writes a `build/` directory anymore: uv_build builds wheels directly into `dist/`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These tests check the runtime that jlink builds, not the Python package, so `test_jdk4py.py` becomes `test_runtime.py`.

Each test now runs its JAR through a helper and keeps that I/O apart from the parsing and assertions.
A missing locale is now reported by name instead of as a failed comparison of two whole sets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`jdk4py <tool> [args...]` runs a tool of the bundled JDK, such as `java`, `keytool`, or `jcmd`.
With uvx, `uvx jdk4py java -version` runs Java without installing a JDK or jdk4py first.

A single `jdk4py` command, rather than putting `java`, `keytool`, and the other tools on `PATH` as #83 suggested, never shadows a JDK the user already has.

On Linux and macOS, the command replaces its own process with the tool, so the tool receives signals and returns its exit code directly.
Windows cannot replace a process, so there the command waits for the tool and exits with its exit code.

CI now runs the README command against each built wheel, which also keeps the check that uv refuses a wheel tagged for another platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show the PyPI version, the supported Python versions, and the license under the title.

- The Python badge reads `requires-python`, since the `pyversions` badge only shows `3` without per-version classifiers.
- The license badge is static, since the `pypi/l` badge leaves out the Classpath exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Temurin 25.0.5 is three quarterly security updates past 25.0.2.
The library API version resets to 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tibdex tibdex changed the title Drop Conda, simplify CI, and upgrade to JDK 25.0.5 Drop Conda, add a jdk4py command, and upgrade to JDK 25.0.5 Nov 12, 2026

@NathanEckert NathanEckert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

Nothing refers to the workflow's name, so GitHub can show the file path instead.
The trusted publisher comment now sits next to the environment it describes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tibdex
tibdex merged commit c1a713b into main Nov 13, 2026
7 checks passed
@tibdex
tibdex deleted the tibdex/drop-conda branch November 13, 2026 16:58
Acriss added a commit that referenced this pull request Nov 19, 2026
The 21 line no longer releases Conda packages, like `main` since #97: remove
the Conda build from CI, the Conda recipe, and the Conda install instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

export java, jmap, keytool ... in in bin Build a cross Python version conda package

2 participants