Fix dynamic version resolution in pyproject.toml#14395
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the dynamic version configuration in pyproject.toml to use geonode.get_version instead of geonode.__version__. However, because setuptools does not execute callables when using the attr directive, referencing a function directly will cause an InvalidVersion error during build and installation. It is recommended to assign the output of get_version() to a string attribute and reference that attribute instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
setuptools resolves the dynamic version attr by reading geonode.__version__ directly. That attribute is a tuple (e.g. (5, 1, 0, 'final', 0)); setuptools normalises a non-string attr by joining it with dots, producing an invalid PEP 440 version like '5.1.0.final.0' and breaking the wheel build. Expose a plain string attribute __version_str__ = get_version() in geonode/__init__.py and point the dynamic version at it, so setuptools reads an already-normalised version string (e.g. '5.1.0').
38aecc2 to
5a50f0b
Compare
No description provided.