Skip to content

Add release workflow - #5

Open
tueda wants to merge 19 commits into
form-dev:masterfrom
tueda:pr/ci/release-workflow
Open

Add release workflow#5
tueda wants to merge 19 commits into
form-dev:masterfrom
tueda:pr/ci/release-workflow

Conversation

@tueda

@tueda tueda commented Jul 2, 2026

Copy link
Copy Markdown

This PR adds a release workflow for publishing package distributions to PyPI when a version tag is pushed.

It also:

  • Sets up formatting, linting and Dependabot.
  • Fixes build issues.
  • Uses dynamic versions derived from Git metadata.

I'd like to refine the release workflow before merging this PR, so it's a draft for now.

After this PR is merged, I plan to push a v5.0.0a5 tag (or 5.0.0a5?) to publish the missing binary wheels.

@tueda
tueda force-pushed the pr/ci/release-workflow branch from ca73b92 to 8c6f631 Compare July 22, 2026 10:10
@tueda

tueda commented Jul 22, 2026

Copy link
Copy Markdown
Author

The main changes since the previous version (ca73b92) of this PR are:

  • Test release wheels with cibuildwheel (CIBW_TEST_COMMAND).
  • Check distributions before publishing to PyPI (check-dist).
  • Test the source distribution (test-sdist).
  • Drop GitHub release creation, which does not seem necessary for this repository.
  • Verify SHA-256 checksums of downloaded source archives.

TODO:

  • Include the relevant licence files in the wheels.

tueda added 19 commits July 25, 2026 17:40
- Use curl instead of wget, as wget may not be available in the build
  environment.
- Add fallback URLs for source archives.
- Fail immediately if downloads from all configured URLs fail.
- Verify SHA-256 checksums of downloaded files.
The macOS linker does not accept the GNU ld option --gc-sections.
Use -dead_strip instead.
- Pass -pthread to FORM builds on Linux when linking against the bundled
  static FLINT library.
- Build the bundled GMP library with --with-pic on macOS x86_64 to avoid
  illegal text relocations when linking its static archive.
- Disable FLINT's use of GMP internals on macOS x86_64 to avoid
  depending on symbols that cannot be resolved at link time.
- Disable FLINT's MPFR check on Darwin x86_64, where the bundled static
  MPFR build does not expose mpfr_mulhigh_n as a linkable symbol.
Use PACKAGE_NAME_SAFE as a workaround for enscons 0.30.0. This covers
form-bin, but does not fully fix canonicalisation.
Use ~=0.30.0 for enscons and ~=0.10.2 for toml so that dependency
resolution stays within their respective minor release series.
Use setuptools-scm at build time to derive the project version from Git
metadata and declare version as dynamic in pyproject.toml.

Regenerate PKG-INFO when the resolved project version changes so that
sdist and wheel versions remain consistent.
Fix links to AUTHORS and the release notes.
Include FORM and dependency license files under .dist-info/licenses
while keeping hepware/build/licenses out of the sdist.
@tueda
tueda force-pushed the pr/ci/release-workflow branch from 8c6f631 to b2d5de7 Compare August 10, 2026 04:18
@tueda

tueda commented Aug 10, 2026

Copy link
Copy Markdown
Author

Changes from 8c6f631:

  • Include license files in the wheels.
  • Regenerate PKG-INFO on version changes.
  • Upgrade FLINT to 3.6.0.

@tueda
tueda marked this pull request as ready for review August 10, 2026 04:19
@tueda tueda closed this Aug 10, 2026
@tueda

tueda commented Aug 10, 2026

Copy link
Copy Markdown
Author

Temporarily closed and reopened to trigger CI.

@tueda tueda reopened this Aug 10, 2026
@tueda
tueda requested a balanced review from Copilot August 10, 2026 05:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds automated, tag-driven PyPI releases alongside build reliability and development tooling improvements.

Changes:

  • Builds, validates, tests, and publishes platform wheels and source distributions.
  • Adds Git-derived versions, dependency checksums, portability fixes, and bundled licenses.
  • Introduces linting, formatting, Dependabot, and repository configuration.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/check-bundled-licenses.py Validates distribution license contents.
SConstruct Adds dynamic versions and license packaging.
README.md Updates documentation links.
pyproject.toml Configures builds, metadata, and lint tools.
hepware/Makefile Improves portable, verified dependency builds.
hepware/LICENSES_bundled.txt Documents bundled software licenses.
form_bin/__main__.py Updates executable entry point.
form_bin/__init__.py Improves typing and temporary-directory handling.
.pre-commit-config.yaml Adds formatting and validation hooks.
.gitignore Adds Python and build exclusions.
.github/zizmor.yml Configures workflow security checks.
.github/workflows/release.yml Adds distribution and PyPI release automation.
.github/workflows/lint.yml Adds pre-commit CI.
.github/dependabot.yml Enables automated dependency updates.
.editorconfig Defines editor formatting rules.
.bake.toml Configures Makefile formatting.
Suppressed comments (1)

SConstruct:77

  • This empty list is only extended with the result of the untyped SCons API, so mypy cannot infer its element type and reports Need type annotation for "wheel_licenses". Add an explicit type so the new strict lint job can pass.
wheel_licenses = []

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread SConstruct
Comment thread form_bin/__main__.py
@tueda

tueda commented Aug 10, 2026

Copy link
Copy Markdown
Author

CI workflows:

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