Skip to content

Conversation

@adiroiban
Copy link

@adiroiban adiroiban commented Oct 31, 2025

Please ensure all items are complete before opening.

What

This uses GitHub Action to autoamtically build the binary wheels and source distribution and publish it to PyPi

This also enabled ABI3 wheel packages so that we can use the binary extension on newer Python versions, without the need to rebuild the wheel.

The IBM C redistributables are hosted on my private server...and I don't think that's ok.

From the licences/English.txt found in the IBM MQ C redist archive:

Redistributables may be distributed, in object-code form, only as part of Licensee's value-added application that was developed using the Program ("Licensee's Application") and only to support use of Licensee's Application.

How

Use GitHub Action to trigger the release process on each PR and tag push.
This should make sure that the code is always ready for release.

Use PyPI Trusted Publishing to automated the release.

Note, to allow future install from git repo, my suggestion is to use .dev0 for the current version from the main branch... only change to the final version on the release branch.

Todo

  • Review GitHub Actions security... for example require manual approval for new GitHub Users. But only for new GitHub Users... older GitHub users should be fine.
  • Activate PyPI Trusted Publishing
  • Maybe find better links to host the IBM MQ C redistributables archives
  • Enable GitHub branch protection to block a merge in main if GitHub Action checks fail.

Testing

There is no testing for now.. the GitHub Actons goes up to the point where PyPI publish step should be triggered

You can preview the run on my fork at https://github.com/chevah/mq-mqi-python/actions/runs/18970566077/job/54177225194?pr=1#step:3:11

Issues

Fixes #2

@adiroiban
Copy link
Author

adiroiban commented Oct 31, 2025

This is an initial code based on what I use to automated wheels building for my private PyPI. I am happy to work on improving it.

This is ready for review. Thanks!

@ibmmqmet
Copy link
Contributor

Apologies for taking so long to get round to looking at this. But as we're now getting close to a new release, it seemed like a suitable time. I've merged this into my local repo, albeit with a few changes. And then it'll be seen as merged publicly once I actually get to the next release.

The main change I made is to remove the "automatic" nature of the action driven off PRs/tags - there are various reasons I want to stick with some manual steps to verify the images first before doing the final uploads to PyPI. And the build will instead get driven via a command script. But the released packages will now include the binary wheels.

I've verified that the system does attempt to load the prebuilt .so file and it fails appropriately if the MQ client is not actually installed.

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.

PyPI binary wheels with IBM MQ C redistributables

2 participants