Skip to content

Conversation

@MatthiasValvekens
Copy link
Collaborator

As promised in #203.

  • Upload both sdist and wheels for a more or less reasonable selection of build targets
  • Create releases on GitHub automatically (pretty basic for now, we can consider adding some form of auto-generated release notes later, perhaps)
  • The version number to release is derived from the tag on which the release is invoked, with the possibility to override if the workflow is invoked manually. This also means that there's no need to keep track of the current version number in the source tree, which gets rid of the need for version bump commits.
  • Support multiple release environments (useful to test changes in the release workflow against TestPyPI, for example)

Result of a test run in TestPyPI: https://test.pypi.org/project/python-pkcs11/0.8.0.dev1/#files. I've spot-tested some of the macOS and Windows wheels by hand, they seem to be working.

Besides the above, I also reorganised the pyproject.toml file a bit, and fixed a flaky test (now that we're running multiple jobs on every commit, the probability that at least one lands in the "freak accident" failure case is relatively high...).

shell: bash
run: |
softhsm2-util --init-token --free --label $PKCS11_TOKEN_LABEL --pin $PKCS11_TOKEN_PIN --so-pin $PKCS11_TOKEN_SO_PIN
- uses: ./.github/actions/install-softhsm
Copy link
Collaborator Author

@MatthiasValvekens MatthiasValvekens Jun 18, 2025

Choose a reason for hiding this comment

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

I extracted the SoftHSMv2 install logic to a separate file initially with the intention to use it for testing wheels during the build phase, but it appears that cibuildwheels uses containers to run its builds, so that didn't work out as planned. I left the install-softhsm action in place, though, since it keeps things a bit more readable.

Copy link
Member

@kislyuk kislyuk left a comment

Choose a reason for hiding this comment

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

@MatthiasValvekens great job, some minor comments. Since you have contributor permissions now, I'm going to switch to approving instead of merging, please merge on your own.

The encoded length of a DSA key is strictly speaking not exactly
predictable.
 - Upload both sdist and wheels
 - Reasonable selection of build targets
 - Integrate with GitHub releases
 - Manage released version based on git tag
 - Support multiple release environments
 - Move extension module setup into pyproject.toml
   It seems that the explicit linkage against user32.lib on Windows is no
   longer required.
 - Divide dependencies into groups

Fixes pyauth#203.
@MatthiasValvekens MatthiasValvekens merged commit d45957f into pyauth:master Jun 19, 2025
16 checks passed
@MatthiasValvekens
Copy link
Collaborator Author

Thanks for the review @kislyuk, I addressed your comment & merged this PR. I also took the liberty to go ahead and merge some of the uncontroversial outstanding bugfix PRs (I left the unreviewed feature additions alone for now).

There were several PRs to update the headers to PKCS#11 3.1 and expose some of the new 3.1 functionality in the CPython layer. I consolidated those into #205.

Once that one's in, maybe we can cut an actual release? 😄

@MatthiasValvekens MatthiasValvekens mentioned this pull request Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants