SUMMARY="Cryptographic library for Python" DESCRIPTION="PyCryptodome is a self-contained Python package of low-level cryptographic \ primitives. PyCryptodome is a fork of PyCrypto. It brings several enhancements with respect \ to the last official version of PyCrypto (2.6.1). This package provides an almost drop-in replacement for PyCrypto (and thus \ conflicts with the 'pycrypto' packages, as it installs as a Python module with \ the name 'Crypto')." HOMEPAGE="https://www.pycryptodome.org/" COPYRIGHT="2014-2023 Legrandin" LICENSE="BSD (2-clause) Public Domain Unlicense " REVISION="2" SOURCE_URI="https://pypi.python.org/packages/source/p/pycryptodome/pycryptodome-$portVersion.tar.gz" CHECKSUM_SHA256="bce2e2d8e82fcf972005652371a3e8731956a0c1fbb719cc897943b3695ad91b" SOURCE_FILENAME="pycryptodome-$portVersion.tar.gz" SOURCE_DIR="pycryptodome-$portVersion" ARCHITECTURES="x86_64 !x86_gcc2" SECONDARY_ARCHITECTURES="x86" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libgmp$secondaryArchSuffix " 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 \"" if [ "$targetArchitecture" = x86_gcc2 ]; then eval "PROVIDES_$pythonPackage+=\" pycryptodome_$pythonPackage = $portVersion \"" fi eval "REQUIRES_$pythonPackage=\" haiku$secondaryArchSuffix lib:libgmp$secondaryArchSuffix cmd:python$pythonVersion \"" eval "CONFLICTS_$pythonPackage=' pycrypto_$pythonPackage '" BUILD_REQUIRES+=" setuptools_$pythonPackage " BUILD_PREREQUIRES+=" cmd:cc$secondaryArchSuffix cmd:python$pythonVersion " done TEST_REQUIRES=" cmd:make " INSTALL() { for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} python=python$pythonVersion installLocation=$prefix/lib/$python/vendor-packages/ export PYTHONPATH=$installLocation:$PYTHONPATH mkdir -p $installLocation rm -rf build # Just in case... to avoid building as pycryptodomex (Cryptodome) # when building locally (maybe after running "hp pycryptodomex"). rm -f ".separate_namespace" $python setup.py build install \ --root=/ --prefix=$prefix # You don't get the docs with `pip install` either, skip docs for now. # install -m 755 -d "$docDir" # install -m 644 -t "$docDir" README.rst packageEntries $pythonPackage \ $prefix/lib/python* done } TEST() { python3 setup.py test export PYTHON=/system/bin/python3 cd src/test make }