diff --git a/lang/python/python-setuptools-scm/Makefile b/lang/python/python-setuptools-scm/Makefile index 9804c28404..44be8a9107 100644 --- a/lang/python/python-setuptools-scm/Makefile +++ b/lang/python/python-setuptools-scm/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-setuptools-scm -PKG_VERSION:=9.2.2 +PKG_VERSION:=10.0.1 PKG_RELEASE:=1 PYPI_NAME:=setuptools-scm PYPI_SOURCE_NAME:=setuptools_scm -PKG_HASH:=1c674ab4665686a0887d7e24c03ab25f24201c213e82ea689d2f3e169ef7ef57 +PKG_HASH:=90dd62d5c06ed3436bd2504331a8e3ccb6e3c3aeda23d257fc2c0b83a053b201 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE @@ -27,7 +27,8 @@ HOST_BUILD_DEPENDS:= \ python-installer/host \ python-wheel/host \ python-packaging/host \ - python-typing-extensions/host + python-typing-extensions/host \ + python-vcs-versioning/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/python-setuptools-scm/test.sh b/lang/python/python-setuptools-scm/test.sh new file mode 100755 index 0000000000..0bce22478c --- /dev/null +++ b/lang/python/python-setuptools-scm/test.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +[ "$1" = "python3-setuptools-scm" ] || exit 0 + +python3 - << EOF +import sys +import setuptools_scm + +if setuptools_scm.__version__ != "$2": + print("Wrong version: " + setuptools_scm.__version__) + sys.exit(1) + +# Test get_version() via pretend version env var (no git repo needed) +import os +os.environ["SETUPTOOLS_SCM_PRETEND_VERSION"] = "1.2.3" +version = setuptools_scm.get_version() +assert version == "1.2.3", f"Expected 1.2.3, got {version}" + +sys.exit(0) +EOF