Drop setup.py in favour of pyproject.toml; bump to 0.2.0 - #133
Merged
Conversation
All packaging metadata now lives in pyproject.toml: version, readme, license (SPDX), authors, classifiers, URLs, the console scripts and the Cython extension. setup.py is removed. Two parts of the extension build cannot be expressed statically in pyproject.toml -- NumPy's include directory is only known once NumPy is importable, and [tool.setuptools] ext-modules cannot express define-macros two-tuples. Both are handled by a small build_ext subclass in _cmac_build.py, wired up via [tool.setuptools.cmdclass]. MANIFEST.in ships that helper in the sdist so source installs still build. packages.find sets namespaces = false to match the previous find_packages() behaviour, keeping the un-packaged cmac/tests out of the distribution. The dead write_version_py/git_version helpers in setup.py were never called (ISRELEASED was undefined) and are dropped with it, so the version is now simply static. Verified: wheel build, sdist build, sdist -> wheel under full build isolation, editable install, and pytest cmac/tests (58 passed). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
conda-forge's Python bakes the flags of the GCC it was built with into
sysconfig's CFLAGS. Compiling cmac.calc_kdp_ray_fir with the runner's
older system gcc failed on flags it does not recognise:
gcc: error: unrecognized command-line option '-partition=none';
did you mean '-flto-partition=none'?
Add c-compiler to the CI environment so a matching conda-forge gcc is
installed and exported as CC on environment activation.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A conda-forge interpreter records the flags of whichever GCC built it in
sysconfig's CFLAGS, and customize_compiler copies those verbatim into
every command line. Python 3.12/3.13 on conda-forge now carry
-partition=none from GCC 16, which neither the runner's system gcc nor
the conda-forge c-compiler pin (gcc 15.3.0) accepts:
gcc: error: unrecognized command-line option '-partition=none';
did you mean '-flto-partition=none'?
Adding c-compiler to the CI environment did not help, since its pinned
gcc trails the one that built the interpreter; revert that and instead
probe the compiler in build_ext and strip the options it rejects. These
are optimization and LTO tuning flags, so dropping them changes nothing
semantically, and this also fixes source installs outside CI.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The previous commit's probe never fired in CI: under a UTF-8 locale GCC
quotes the offending option with U+2018/U+2019 ("unrecognized
command-line option ‘-partition=none’"), while the pattern assumed the
ASCII quoting clang had produced locally, so nothing was stripped and
the build failed exactly as before.
Run the probe under LC_ALL=C so diagnostics come back in ASCII, and
match the quoting loosely as a backstop in case that is ignored.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
zssherman
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This drops setup.py and integrates it into pyproject.toml. This also bumps the release to 0.2.0. Authored with assistance from Claude Opus 5.