Skip to content

Add PyPI publishing job and release process - #84

Merged
aaronj0 merged 5 commits into
compiler-research:mainfrom
aaronj0:pypi-publish
Sep 7, 2026
Merged

Add PyPI publishing job and release process#84
aaronj0 merged 5 commits into
compiler-research:mainfrom
aaronj0:pypi-publish

Conversation

@aaronj0

@aaronj0 aaronj0 commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@aaronj0
aaronj0 requested a review from vgvassilev September 6, 2026 11:53
@aaronj0 aaronj0 added the build-wheels Trigger build and test of all Wheels workflows. label Sep 6, 2026
Comment thread docs/ReleaseNotes.md

<!-- Contributors since the previous release, with commit counts, in
alphabetical order:
git log --pretty='%an' <previous-tag>..HEAD | sort | uniq -c

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

here will be replaced with the last tag after the first release

Comment thread docs/ReleaseProcess.md Outdated
Comment thread docs/ReleaseProcess.md
## Procedure

1. Open the release PR:
- Set `__version__` in `python/cppjit/_version.py` to the release

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.

How does cmake know what is the current version? Does it need to parse that? We should probably have some notion of a simple VERSION file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The single source is python/cppjit/_version.py, which the build system reads with the regex declared in pyproject.toml when building the wheel/sdist, and provides cppjit.__version__ at runtime. This is the recommended practice for Python packages: https://packaging.python.org/en/latest/discussions/single-source-version/

cppyy also followed the same practice, setup.py regex-reads python/cppyy/_version.py and cites the same PyPA guide: https://github.com/wlav/cppyy/blob/2d28e09af72dd7f951c341d74266a0c31599d8a8/setup.py#L36

If we need the info in CMake (a build stamp etc.) we can have it read the same file with a one-line string(REGEX MATCH), so I don't think we need a separate VERSION file, that would just be a second copy to keep in sync.

vgvassilev
vgvassilev previously approved these changes Sep 7, 2026

@vgvassilev vgvassilev 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.

LGTM % comments

Comment thread pyproject.toml
name = "cppjit"
dynamic = ["version"]
description = "CppJIT: fast and automatic Python-C++ interoperability"
description = "Automatic Python-C++ interoperability layer and bindings generator"

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.

Consider:

Suggested change
description = "Automatic Python-C++ interoperability layer and bindings generator"
description = "An automatic PythonC++ interoperability layer and bindings generator built on LLVM's Clang-REPL"

Consider also adding '"exascale", "scientific-computing",' to the keywords.

Consider adding the following topics to the github repo: python, cpp, llvm, clang, clang-repl, jit, jit-compilation, python-bindings, bindings, interoperability, ffi, cppyy, cppinterop

@vgvassilev vgvassilev 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.

LGTM!

@aaronj0
aaronj0 merged commit 7c06ac0 into compiler-research:main Sep 7, 2026
38 of 40 checks passed
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

CppJIT CI has detected a new failure on workflow CI running on main while building 7c06ac0 at job "macos-26-intel/llvm22/py3.12/c++20 / Build & Test".

Full details are available at: https://github.com/compiler-research/cppjit/actions/runs/34102870577
Here is the relevant piece of the build log for the reference

Step "Build and test" failure:
  Python3_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.12.10/x64
  LLVM_DIR: /Users/runner/work/cppjit/cppjit/install/lib/cmake/llvm
  Clang_DIR: /Users/runner/work/cppjit/cppjit/install/lib/cmake/clang
##[endgroup]
(node:45822) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
(node:45822) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
Uploaded bytes 230
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact zip is 6c93de419a9c93f53d104c1d9776f372a9881cc09aaeefa7a81a5afc58615ceb
Finalizing artifact upload
Artifact result-macos-26-intel-llvm22-py3.12-cxx20.zip successfully finalized. Artifact ID 10011467423
Artifact result-macos-26-intel-llvm22-py3.12-cxx20 has been successfully uploaded! Final size is 230 bytes. Artifact ID is 10011467423
Artifact download URL: https://github.com/compiler-research/cppjit/actions/runs/34102870577/artifacts/10011467423
Post job cleanup.
Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
Post job cleanup.
[command]/usr/local/bin/git version
git version 2.55.0
Copying '/Users/runner/.gitconfig' to '/Users/runner/work/_temp/57a3c6a0-dca0-4f36-8fef-bcfe35bf83cd/.gitconfig'
Temporarily overriding HOME='/Users/runner/work/_temp/57a3c6a0-dca0-4f36-8fef-bcfe35bf83cd' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/local/bin/git config --global --add safe.directory /Users/runner/work/cppjit/cppjit
[command]/usr/local/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/local/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
[command]/usr/local/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
[command]/usr/local/bin/git config --local --unset-all http.https://github.com/.extraheader
[command]/usr/local/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
[command]/usr/local/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir:
[command]/usr/local/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Evaluate and set job outputs
Set output 'summary'
Cleaning up orphan processes
##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-python@v5, actions/upload-artifact@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-wheels Trigger build and test of all Wheels workflows.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants