Skip to content

MNT build with isolation so setuptools-scm sets the version in docs - #780

Merged
kroq-gar78 merged 2 commits into
devfrom
yes-build-isolation
Nov 2, 2026
Merged

kroq-gar78 merged 2 commits into
devfrom
yes-build-isolation

Conversation

@kroq-gar78

@kroq-gar78 kroq-gar78 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The published docs for 1.4.0 wrongly show 1.3.0.dev0 in the title.

This is because when building the docs with --no-build-isolation but without setuptools-scm, cortex.__version__ never gets filled in. It silently falls back to a hardcoded '1.3.0.dev0'.

--no-build-isolation was added in #385 to work around the numpy 1.20 ABI break. Extensions built against numpy 2 run on numpy 1.x too, so it is no longer needed.

This PR makes 3 changes:

  • It drops --no-build-isolation from CI and all instructions; pip now automatically installs all packages listed in build-system.requires from pyproject.toml.
  • It sets the fallback version to an obviously-wrong '0+unknown' instead of a real-looking version that goes stale.
  • It bumps the minimum version for setuptools to support Python 3.12+. This is needed because we don't explicitly install or upgrade it anymore.

After merging, we should re-publish the docs.

@kroq-gar78 kroq-gar78 changed the title MNT build with isolation so setuptools-scm sets the version MNT build with isolation so setuptools-scm sets the version in docs Nov 1, 2026
Building with --no-build-isolation without setuptools-scm installed never
generates cortex/_version.py, so cortex.__version__ silently fell back to a
hardcoded '1.3.0.dev0'. That is why the published docs show 1.3.0.dev0.

--no-build-isolation was added in #385 to work around the numpy 1.20 ABI
break. Extensions built against numpy 2 run on numpy 1.x too, so it is no
longer needed. Drop it (and the manual build-dependency pre-installs it
required) from the CI workflows, README, and install docs, and let pip
install build-system.requires from pyproject.toml.

Also make the fallback version an obviously-wrong '0+unknown' instead of a
real-looking version that goes stale.
The build isolation changes removed the instructions to upgrade
setuptools, so now we need to accurately set the minimum.
@kroq-gar78
kroq-gar78 marked this pull request as ready for review November 1, 2026 09:43
@kroq-gar78
kroq-gar78 requested a review from jwparks November 1, 2026 09:43

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

Overall, the change itself looks correct and low-risk to me. Thanks for this maintenance.

@kroq-gar78

Copy link
Copy Markdown
Contributor Author

Great, I'm going to merge it now, but let's put off re-publishing the docs until a new release. Right now setuptools-scm would give us 1.4.1.dev4 or the like, which could be confusing.

@kroq-gar78
kroq-gar78 merged commit 57895a9 into dev Nov 2, 2026
14 checks passed
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