Title: [MNT]: Changing the release workflow for external builds · Issue #30765 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Changing the release workflow for external builds · Issue #30765 · matplotlib/matplotlib
X Title: [MNT]: Changing the release workflow for external builds · Issue #30765 · matplotlib/matplotlib
Description: Intro This is an implementation following the pattern of https://github.com/scipy/scipy-release of building release builds outside of the main repo. Currently it lives at https://github.com/ksunden/matplotlib-release I am in particular l...
Open Graph Description: Intro This is an implementation following the pattern of https://github.com/scipy/scipy-release of building release builds outside of the main repo. Currently it lives at https://github.com/ksunden...
X Description: Intro This is an implementation following the pattern of https://github.com/scipy/scipy-release of building release builds outside of the main repo. Currently it lives at https://github.com/ksunden...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30765
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Changing the release workflow for external builds","articleBody":"Intro\n=====\n\nThis is an implementation following the pattern of https://github.com/scipy/scipy-release of building release builds outside of the main repo.\n\nCurrently it lives at https://github.com/ksunden/matplotlib-release\n\nI am in particular looking for technical review from @qulogic, and policy review from the steering council (@tacaswell @efiring @dopplershift @timhoffm).\n\nCatalyzing incident (failure to upload v3.10.8)\n===============================================\n\nThe build failed, not because of anything actually wrong with matplotlib, but because\none of the dependencies (Pillow) lacked a wheel and the headers to build from source were missing.\nThe failure was in the `test` stage, not the wheel building stage.\n\nRather than fix in repo and tag as 3.10.9, skipping yet another version in this series,\nI decided to accelerate the timeline for building in an external repo.\n\n\n\nTechnical details\n=================\n\nUsage\n-----\n\nBranches mirror the main repo with `main` and `v3.XX.x` branches\n\nTarget is set by editing the `SOURCE_REF_TO_BUILD: main` at the top of the workflow file.\nFor releases, this should point to the _tag_\n\nRelease builds are done via `dispatch_workflow` with the `pypi` option chosen. (Most often web UI, also available vi CLI etc)\n\n\n\nChanges from existing workflows\n-------------------------------\n\n- License file munging\n - In doing a review, noticed that our auxilliary licenses are not being included and have not been since 3.9.0\n - Meson-python version that we use does not handle multiple license files\n - May look into newer versions, we were pinned for unrelated reasons, worth investigating\n - Auxilliary licenses combined into one file, which lives in the matplotlib-release repo\n - That file is cat'd onto the main LICENSE file, which is then included in wheel .dist-info\n - Happens as a separate job that uploads the artifact for auditability\n - Interstitial sdist uploaded with a name that is not caught by publish artifact downloader\n- Trigger conditions:\n - since this repo is separate, I do just trigger on push/pull request, but final uploads _must_ be done with `workflow_dispatch` (which is new)\n- `CIBW_AFTER_BUILD` does not actually exist, so those steps were not run previously\n - Moved some into `CIBW_TEST_COMMAND`, but in the process of getting things to work mostly elided\n - Twine check removed because python 3.13t proved hard due to `cryptography` trying to install there (CFFI under the hood the problem)\n - License check removed due to combining into one file\n- `CIBW_TEST_ENVIRONMENT` added `PIP_PREFER_BINARY=1`\n - This is the actual fix for why 3.10.8 failed\n - Used the general solution to avoid similar problems in the future\n\n- Upload tasks\n - Largely taken from scipy's version, with only minor edits (mostly s/scipy/matplotlib/g)\n - Include testpypi upload option\n - Include check that upstream reference is a tag\n - I did not change this other than the repo it points to, seems potentially underspecified but didn't look too hard at it\n - Attestations now baked into the pypa/gh-action-pypi-publish, so removed that extra step\n - id-token only permission necessary it seems\n - I have not fully tested these, as fully doing so requires uploading to PyPI, sooo\n\nFollowup steps\n==============\n\nNear term/get 3.10.8 out\n------------------------\n\n- [ ] move matplotlib-release into matplotlib github org\n - [ ] ensure permissions are restricted to necessary parties only (release managers, steering council, perhaps it)\n- [ ] set up PyPI trusted publishers to look to matplotlib-release\n- [ ] Run workflow with appropriate settings to publish on the v3.10.x branch\n- [ ] update devdocs for new release workflow (Would like to do it once first to make sure, but don't want to put it off)\n\nFuture work\n-----------\n\n- [ ] Work towards removing CIBW jobs from main repo\n - [ ] Make the matplotlib-release version triggerable from the main repo \n - Currently we run the job on merges and on labeled PRs, can probably look towards doing the same, though opportunity to think about it\n - [ ] Upload to nightlies from matplotlib-release\n - scipy does it on scheduled runs of the cibw job, we could copy that\n - we currently do as a separate job that runs on a schedule but picks up the latest successful run\n - [ ] Better notification of failures\n - e.g. open issues like \"upcoming nightly failures\" does\n - possibly needs to check backport branches too?\n - impact is lessened by the ability to build from the same tag with different CIBW settings, so less important than it would otherwise be\n- [ ] Consider features that may be useful\n - [ ] Some of this can be shared with scipy/etc who are also doing similar things\n - [ ] e.g. we could make the target a variable that can be passed into the job\n - Useful for triggering from the main repo\n - Could make release workflow easier (i.e. don't need to edit the workflow file)\n - On the other hand, a little friction is often a good thing, so, perhaps not a priority\n - [ ] Consider if other settings should be moved to the release repo\n - e.g. build flags, pyproject.toml, etc.\n - Current leaning: only when proven necessary, so hopefully never, but escape hatches may exist\n- [ ] Investigate meson-python update and enabling multiple license files\n - Would allow removal of step/artifact\n - Original reason for pinning was to do with symlinks, 0.18 supposedly fixes our problem, and has at least some support for multiple license files\n - things to look for: dynamic `license-files` (we specify in meson.build, but don't think they get used)\n - in particular the QHull license is a little funky since it is not in the repo by default","author":{"url":"https://github.com/ksunden","@type":"Person","name":"ksunden"},"datePublished":"2025-11-18T23:52:54Z","url":"https://github.com/matplotlib/matplotlib/issues/30765"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5aa77cd3-f0a0-dd59-ef2e-39884415d33a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DACA:E76E0:101DEC8:15812F5:6B0654E7 |
| html-safe-nonce | 92b0feb5c660655c7ff38f483abcd6bdeb21237d8b70ebbca20e8c2f1717ea9d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUNBOkU3NkUwOjEwMURFQzg6MTU4MTJGNTo2QjA2NTRFNyIsInZpc2l0b3JfaWQiOiI4NzgzNDI0Njg3MjUxNTQzMjcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8ae46f03a019b90c9cab27c74864b0e178531c6de548f0e057bd270094d64555 |
| hovercard-subject-tag | issue:3640431122 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/30765/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bf3acb18c006d84b787e233f52556c295b86edf42472103a2131b7c9902bb376/matplotlib/matplotlib/issues/30765 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bf3acb18c006d84b787e233f52556c295b86edf42472103a2131b7c9902bb376/matplotlib/matplotlib/issues/30765 |
| og:image:alt | Intro This is an implementation following the pattern of https://github.com/scipy/scipy-release of building release builds outside of the main repo. Currently it lives at https://github.com/ksunden... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ksunden |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297 |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f0aa75f4141d440c6110dc31af7ea7797abb6c4 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width