python-idna: Update to 3.6
This also adds a test.sh script for the packages feed CI. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
parent
41e500535c
commit
7d1febb77f
2 changed files with 27 additions and 6 deletions
|
@ -8,14 +8,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-idna
|
PKG_NAME:=python-idna
|
||||||
PKG_VERSION:=3.4
|
PKG_VERSION:=3.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PYPI_NAME:=idna
|
PYPI_NAME:=idna
|
||||||
PKG_HASH:=814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4
|
PKG_HASH:=9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
PKG_LICENSE_FILES:=LICENSE.rst
|
PKG_LICENSE_FILES:=LICENSE.md
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=python-flit-core/host
|
PKG_BUILD_DEPENDS:=python-flit-core/host
|
||||||
|
@ -30,9 +30,7 @@ define Package/python3-idna
|
||||||
SUBMENU:=Python
|
SUBMENU:=Python
|
||||||
TITLE:=IDNA library
|
TITLE:=IDNA library
|
||||||
URL:=https://github.com/kjd/idna
|
URL:=https://github.com/kjd/idna
|
||||||
DEPENDS:= \
|
DEPENDS:=+python3-light +python3-codecs
|
||||||
+python3-light \
|
|
||||||
+python3-codecs
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/python3-idna/description
|
define Package/python3-idna/description
|
||||||
|
|
23
lang/python/python-idna/test.sh
Normal file
23
lang/python/python-idna/test.sh
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ "$1" = python3-idna ] || exit 0
|
||||||
|
|
||||||
|
python3 - << 'EOF'
|
||||||
|
|
||||||
|
import idna
|
||||||
|
import idna.codec
|
||||||
|
|
||||||
|
assert idna.encode('ドメイン.テスト') == b'xn--eckwd4c7c.xn--zckzah'
|
||||||
|
assert idna.decode('xn--eckwd4c7c.xn--zckzah') == 'ドメイン.テスト'
|
||||||
|
|
||||||
|
assert 'домен.испытание'.encode('idna2008') == b'xn--d1acufc.xn--80akhbyknj4f'
|
||||||
|
assert b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008') == 'домен.испытание'
|
||||||
|
|
||||||
|
assert idna.alabel('测试') == b'xn--0zwm56d'
|
||||||
|
|
||||||
|
assert idna.encode('Königsgäßchen', uts46=True) == b'xn--knigsgchen-b4a3dun'
|
||||||
|
assert idna.decode('xn--knigsgchen-b4a3dun') == 'königsgäßchen'
|
||||||
|
|
||||||
|
assert idna.encode('Königsgäßchen', uts46=True, transitional=True) == b'xn--knigsgsschen-lcb0w'
|
||||||
|
|
||||||
|
EOF
|
Loading…
Reference in a new issue