We encountered an issue (Issue #48) where pip install -e . failed due to a versioning conflict with PEP 440 standards. The error was triggered during the metadata generation phase, specifically when running setup.py egg_info, indicating an invalid version format from git describe output.
This pull request addresses the problem by updating setup.py to ensure the version string fetched from git tags complies with PEP 440 standards. The modifications include:
Utilizing subprocess.check_output with text=True and strip() to correctly capture and process the git version string.
Applying regular expressions to transform the git describe output into a PEP 440 compliant version string. This involves:
Stripping the initial 'v' from tags (e.g., 'v4.3-42-g96ab099' to '4.3-42-g96ab099').
Replacing the '-' between the number of commits and the git hash with a '+', and appending '.sha' before the hash (e.g., '4.3-42-g96ab099' to '4.3+42.sha96ab099').
These changes ensure that the versioning scheme used by CellModeller is both dynamic, reflecting the current state of the repository, and compliant with Python packaging standards, thus preventing errors during package installation with pip.
The fix has been tested by attempting a fresh installation using pip install -e . on a system with the same pip and Python versions as reported in issue #48. The installation now proceeds without the previously encountered metadata generation error.
This update is critical for maintaining the usability of CellModeller across environments where pip and setuptools enforce strict compliance with PEP 440 for package versions.
Users are encouraged to report any further issues with installation or version handling. This fix is backward compatible and should not affect existing installations or development workflows.
We encountered an issue (Issue #48) where pip install -e . failed due to a versioning conflict with PEP 440 standards. The error was triggered during the metadata generation phase, specifically when running setup.py egg_info, indicating an invalid version format from git describe output.
This pull request addresses the problem by updating setup.py to ensure the version string fetched from git tags complies with PEP 440 standards. The modifications include:
These changes ensure that the versioning scheme used by CellModeller is both dynamic, reflecting the current state of the repository, and compliant with Python packaging standards, thus preventing errors during package installation with pip.
The fix has been tested by attempting a fresh installation using pip install -e . on a system with the same pip and Python versions as reported in issue #48. The installation now proceeds without the previously encountered metadata generation error.
This update is critical for maintaining the usability of CellModeller across environments where pip and setuptools enforce strict compliance with PEP 440 for package versions.
Users are encouraged to report any further issues with installation or version handling. This fix is backward compatible and should not affect existing installations or development workflows.
Closes #48.