mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-11 06:10:06 +02:00
90 lines
2.2 KiB
Bash
90 lines
2.2 KiB
Bash
SUMMARY="Pure-Python implementation of ASN.1 types and codecs"
|
|
DESCRIPTION="Pure-Python implementation of ASN.1 types and DER/BER/CER codecs \
|
|
(X.208)"
|
|
HOMEPAGE="http://snmplabs.com/pyasn1/
|
|
https://github.com/etingof/pyasn1
|
|
https://pypi.org/project/pyasn1"
|
|
COPYRIGHT="2005-2020 Ilya Etingof"
|
|
LICENSE="BSD (2-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_$pythonPackage=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
cmd:python$pythonVersion\
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
BUILD()
|
|
{
|
|
# This is an "any" package, "building" it will create a
|
|
# "$portBaseName-$portVersion-py3-none-any.whl" file that can be installed
|
|
# on multiple Python versions, so we only need to build once.
|
|
python=python${PYTHON_VERSIONS[0]}
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
|
|
# wheel filename has the pattern: $portBaseName-$portVersion-*-none-any.whl
|
|
# with the asterisk being: "py2-py3" or "py3".
|
|
$python -m installer --p $prefix dist/$portName-$portVersion-*-none-any.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|
|
|
|
# Reference results on hrev59005, 64 bits:
|
|
# only two tests fail out of about 1178:
|
|
# test_integer (unittest.loader._FailedTest) ... ERROR
|
|
# test_octets (unittest.loader._FailedTest) ... ERROR
|
|
# both fails are related to "ModuleNotFoundError: No module named 'tests.compat.{test_integer,test_octets}'"
|
|
TEST()
|
|
{
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
$python -m tests
|
|
done
|
|
}
|