Skip to content

Support dynamic version for dev and releases.#617

Open
ccoulombe wants to merge 1 commit intogoogle-deepmind:mainfrom
ccoulombe:dynamic-version
Open

Support dynamic version for dev and releases.#617
ccoulombe wants to merge 1 commit intogoogle-deepmind:mainfrom
ccoulombe:dynamic-version

Conversation

@ccoulombe
Copy link
Copy Markdown

When installing from HEAD, this would allow one to have traceable reproducibility.
A local wheel built today from a fresh clone, would be tagged alphafold3-3.0.2.dev113+gebfe70a27.d20260206-cp313-cp313-linux_x86_64.whl.

The version is incremented from the current tag.
A dev release suffix which show that 113 commits have been made since.
A local version +gebfe70a27.d20260206 which means :

  • gebfe70a27 (g+short commit)
  • d20260206 (d+date)

Hence it is easy to know which build/commit a user used as it is described in the file name.

Ref:

@Augustin-Zidek
Copy link
Copy Markdown
Collaborator

Wouldn't the CMake part need to be updated as well?

@ccoulombe
Copy link
Copy Markdown
Author

ccoulombe commented Mar 6, 2026 via email

@Augustin-Zidek
Copy link
Copy Markdown
Collaborator

Sorry for the late reply. Will this work correctly with this line in CMakeLists.txt:

project(
  "${SKBUILD_PROJECT_NAME}"
  LANGUAGES CXX
  VERSION "${SKBUILD_PROJECT_VERSION}")

The ${SKBUILD_PROJECT_VERSION} variable in particular.

@ccoulombe
Copy link
Copy Markdown
Author

With the changes from this PR, I was able to build ebfe70a27a6a1ad18c77664191c5f7fa486ebee9 of AF3.

  Created wheel for alphafold3: filename=alphafold3-3.0.2.dev113+gebfe70a27.d20260402-cp313-cp313-linux_x86_64.whl size=242965375 sha256=221d6b8d0464d5018a373e5dd1aab767cb3f0eb75883e0e74024b2f23cdef61c

And adding some print status from CMake:

  -- Detecting CXX compile features - done
  -- >>> SKBUILD_PROJECT_VERSION = 3.0.2
  -- >>> PROJECT_VERSION = 3.0.2

Thus, I'd say yes. Esp. since it is scikit-build-core that manage the version via

metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"

From the documentation,

If you need to set the CMake project version without scikit-build-core (which provides ${SKBUILD_PROJECT_VERSION})

we could infer that it manages the variable SKBUILD_PROJECT_VERSION correctly.

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