mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
pyasn1: update to version 0.6.1.
This commit is contained in:
@@ -1,101 +0,0 @@
|
||||
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="2007-2018 Ilya Etingof"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="4"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
rm -rf "$sourceDir"-$pythonPackage
|
||||
cp -a "$sourceDir" "$sourceDir"-$pythonPackage
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py build
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py install \
|
||||
--root=/ --prefix="$prefix"
|
||||
|
||||
install -m 755 -d "$dataDir"/licenses
|
||||
install -m 644 -T LICENSE.rst "$dataDir"/licenses/pyasn1.rst
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
|
||||
install -m 755 -d "$dataDir"/licenses "$docDir"
|
||||
install -m 644 -T LICENSE.rst "$dataDir"/licenses/pyasn1.rst
|
||||
install -m 644 -t "$docDir" README.md
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
$python setup.py tests
|
||||
done
|
||||
}
|
||||
89
dev-python/pyasn1/pyasn1-0.6.1.recipe
Normal file
89
dev-python/pyasn1/pyasn1-0.6.1.recipe
Normal file
@@ -0,0 +1,89 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user