diff --git a/lang/python/python-sniffio/Makefile b/lang/python/python-sniffio/Makefile index 02fd56f773..8f8aa8575f 100644 --- a/lang/python/python-sniffio/Makefile +++ b/lang/python/python-sniffio/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-sniffio -PKG_VERSION:=1.3.0 -PKG_RELEASE:=2 +PKG_VERSION:=1.3.1 +PKG_RELEASE:=1 PYPI_NAME:=sniffio -PKG_HASH:=e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 +PKG_HASH:=f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc PKG_LICENSE:=Apache-2.0 MIT PKG_LICENSE_FILES:=LICENSE.APACHE2 LICENSE.MIT PKG_MAINTAINER:=Julien Malik +PKG_BUILD_DEPENDS:=python-setuptools/host python-setuptools-scm/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/python-sniffio/test.sh b/lang/python/python-sniffio/test.sh new file mode 100755 index 0000000000..861fa927cb --- /dev/null +++ b/lang/python/python-sniffio/test.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +[ "$1" = "python3-sniffio" ] || exit 0 + +python3 - << EOF +import sys +import sniffio + +if sniffio.__version__ != "$2": + print("Wrong version: " + sniffio.__version__) + sys.exit(1) + +from sniffio import current_async_library +from sniffio import AsyncLibraryNotFoundError + +# Outside async context should raise +try: + current_async_library() + sys.exit(1) +except AsyncLibraryNotFoundError: + pass + +sys.exit(0) +EOF