Skip to content

Commit

Permalink
Move from setuptools_scm to setuptools-git-versioning
Browse files Browse the repository at this point in the history
setuptools has recently deprecated legacy versioning, so we moved to
configuring setuptools_scm with the no-guess-dev option. It appears
that a release always adds version bump in addition to the git tag.

e.g. release 1.0.1 reports its version as
1.0.1.post1.dev0+g3859438.d20230308

while 3859438 is the commit that was tagged on master as 1.0.1, the
version has a post-release suffix (and appears to have been
interpreted as a dev release?).

The issue reported here appears to be the same:
pypa/setuptools-scm#812

Trying setuptools-git-versioning instead in the hope that it is less
"clever".
  • Loading branch information
kjsanger committed Mar 9, 2023
1 parent 3859438 commit 81d2062
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ ml-warehouse@https://github.com/wtsi-npg/ml-warehouse-python/releases/download/1
partisan@https://github.com/wtsi-npg/partisan/releases/download/2.1.0/partisan-2.1.0.tar.gz
rich==13.3.1
setuptools==67.5.1
setuptools_scm==7.1.0
setuptools-git-versioning==1.13.2
sqlalchemy==1.4.44
structlog==22.3.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
author="Keith James",
author_email="kdj@sanger.ac.uk",
description=".",
use_scm_version={"version_scheme": "no-guess-dev"},
python_requires=">=3.10",
packages=find_packages("src"),
package_dir={"": "src"},
setup_requires=["setuptools_scm"],
setup_requires=["setuptools-git-versioning"],
setuptools_git_versioning={"enabled": True},
install_requires=["ml-warehouse", "partisan", "rich", "sqlalchemy", "structlog"],
tests_require=["black", "pytest", "pytest-it"],
scripts=[
Expand Down

0 comments on commit 81d2062

Please sign in to comment.