mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
python-awesomeversion: update to 25.8.0; add test.sh
Bump version 23.5.0 -> 25.8.0. Switch build dependency from python-poetry-core to python-hatchling. Add test.sh to verify version parsing, comparison, and strategy detection. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
c37fd13ffe
commit
a8e4f384fe
@@ -8,17 +8,17 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=python-awesomeversion
|
||||
PKG_VERSION:=23.5.0
|
||||
PKG_VERSION:=25.8.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PYPI_NAME:=awesomeversion
|
||||
PKG_HASH:=a505558316010d2d10d487226f79c1157204af00fa462fdcf948e347011dd491
|
||||
PKG_HASH:=e6cd08c90292a11f30b8de401863dcde7bc66a671d8173f9066ebd15d9310453
|
||||
|
||||
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENCE.md
|
||||
|
||||
PKG_BUILD_DEPENDS:=python-poetry-core/host
|
||||
PKG_BUILD_DEPENDS:=python-hatchling/host
|
||||
|
||||
include ../pypi.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
20
lang/python/python-awesomeversion/test.sh
Normal file
20
lang/python/python-awesomeversion/test.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$1" = python3-awesomeversion ] || exit 0
|
||||
|
||||
python3 - << 'EOF'
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionStrategy
|
||||
|
||||
v = AwesomeVersion("1.2.3")
|
||||
assert v.major == 1
|
||||
assert v.minor == 2
|
||||
assert v.patch == 3
|
||||
|
||||
v2 = AwesomeVersion("2.0.0")
|
||||
assert v2 > v
|
||||
|
||||
sem = AwesomeVersion("1.0.0")
|
||||
assert sem.strategy == AwesomeVersionStrategy.SEMVER
|
||||
|
||||
print("python3-awesomeversion OK")
|
||||
EOF
|
||||
Reference in New Issue
Block a user