contrib/python3-idna/Pkgfile

26 lines
885 B
Plaintext
Raw Normal View History

2018-03-15 13:14:28 +01:00
# Description: Internationalized Domain Names in Applications (IDNA).
# URL: https://github.com/kjd/idna
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: python3-pip
# Optional: python3-flit-core
2018-03-15 13:14:28 +01:00
name=python3-idna
2022-09-17 08:54:20 +02:00
version=3.4
2018-03-15 13:14:28 +01:00
release=1
source=(https://files.pythonhosted.org/packages/source/${name:8:1}/${name#*-}/${name#*-}-$version.tar.gz)
build() {
cd ${name#*-}-$version
_pyver=$(/usr/bin/python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
if prt-get isinst python3-flit-core; then
/usr/bin/python3 -m build --wheel --skip-dependency-check --no-isolation
/usr/bin/python3 -m installer --compile-bytecode 0 --destdir=$PKG dist/*.whl
else
/usr/bin/pip3 install --isolate --root=$PKG --ignore-installed --compile --no-deps idna==$version
fi
rm -rf $PKG/usr/lib/python$_pyver/site-packages/idna-$version.dist-info/{INSTALLER,REQUESTED}
2018-03-15 13:14:28 +01:00
}