Skip to content

Conversation

@maxbriel
Copy link
Collaborator

@maxbriel maxbriel commented Jan 8, 2026

Extracts the versioneer version using conda's build in function to add it inside meta.yaml.
I wasn't able to test properly, because my local conda build fails (also without this change).

See here for an example: https://docs.conda.io/projects/conda-build/en/stable/resources/define-metadata.html#loading-data-from-other-files

@maxbriel maxbriel requested a review from sgossage January 8, 2026 09:43
@maxbriel maxbriel self-assigned this Jan 8, 2026
@maxbriel maxbriel added the enhancement New feature or request label Jan 8, 2026
@maxbriel maxbriel requested a review from a team January 8, 2026 09:45
@sgossage
Copy link
Contributor

@maxbriel, how do we update the project version with this approach? Is the idea that we'd edit

setup(
    name=DISTNAME,
    provides=[PACKAGENAME],
    version=__version__,
    ...

in setup.py so that version = NEW_VERSION?

@maxbriel
Copy link
Collaborator Author

maxbriel commented Jan 13, 2026

This branch still has versioneer.py installed, so it will use the github tag of the release to set the version in setup.py. Then the load_setup_py_data from conda loads in the setup.py with the associated variables. This contains the version set by versioneer.py. It then uses that tag to set the conda tag. #784 would replace this with a different mechanism to achieve the same using setuptools-scm.

It should be possible to test this on Linux with conda build.
There it should be possible to verify the tag (I will try to get my local github actions working again).

This basically removes the manual step of updating the conda version number for each release.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants