From f5fd23b57513b511f5fd467dba543eace8e3b61f Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sat, 4 Apr 2026 20:34:52 +0300 Subject: [PATCH] python-pathspec: bump to 1.0.4 Changelog: https://github.com/cpburnz/python-pathspec/blob/master/CHANGELOG.rst First stable 1.x release with API refinements and bug fixes. Add test.sh to verify gitignore-style pattern matching. Signed-off-by: Alexandru Ardelean --- lang/python/python-pathspec/Makefile | 4 ++-- lang/python/python-pathspec/test.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 lang/python/python-pathspec/test.sh diff --git a/lang/python/python-pathspec/Makefile b/lang/python/python-pathspec/Makefile index 9a0e0bf39a..07a8068947 100644 --- a/lang/python/python-pathspec/Makefile +++ b/lang/python/python-pathspec/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pathspec -PKG_VERSION:=0.12.1 +PKG_VERSION:=1.0.4 PKG_RELEASE:=1 PYPI_NAME:=pathspec -PKG_HASH:=a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712 +PKG_HASH:=0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645 PKG_LICENSE:=MPL-2.0 PKG_LICENSE_FILES:=LICENSE diff --git a/lang/python/python-pathspec/test.sh b/lang/python/python-pathspec/test.sh new file mode 100755 index 0000000000..7b8278802e --- /dev/null +++ b/lang/python/python-pathspec/test.sh @@ -0,0 +1,12 @@ +#!/bin/sh +[ "$1" = python3-pathspec ] || exit 0 +python3 - << 'EOF' +import pathspec +assert pathspec.__version__, "pathspec version is empty" + +spec = pathspec.PathSpec.from_lines("gitwildmatch", ["*.py", "!test_*.py", "build/"]) +assert spec.match_file("foo.py") +assert not spec.match_file("test_foo.py") +assert spec.match_file("build/output.txt") +assert not spec.match_file("foo.txt") +EOF