Files
haikuports/dev-python/cryptography/cryptography-3.4.8.recipe
OscarL c50dea9f70 cryptography: recipe cleanups. (#11732)
Do not depend on libpython3.xx.so, but on cmd:python3.xx.

Untested, as I don't have the necessary rust dependencies to build this one.
2025-02-05 17:48:46 +00:00

91 lines
2.3 KiB
Bash

SUMMARY="A Python module providing cryptographic recipes and primitives"
DESCRIPTION="cryptography is a module designed to expose cryptographic \
primitives and recipes to Python developers. \
It includes both high level recipes and low level interfaces to common \
cryptographic algorithms such as symmetric ciphers, message digests, and key \
derivation functions."
HOMEPAGE="https://cryptography.io/"
COPYRIGHT="2013-2020 The cryptography developers"
LICENSE="Apache v2
BSD (3-clause)"
REVISION="4"
SOURCE_URI="https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-$portVersion.tar.gz"
CHECKSUM_SHA256="94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cryptography$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix >= 3
devel:libffi$secondaryArchSuffix
devel:libssl$secondaryArchSuffix >= 3
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
cmd:rustc$secondaryArchSuffix
"
PYTHON_VERSIONS=(3.10)
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_${pythonPackage}+=\"
cryptography_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
asn1crypto_$pythonPackage
cffi_$pythonPackage
idna_$pythonPackage
pyasn1_$pythonPackage
six_$pythonPackage
cmd:python$pythonVersion
lib:libcrypto$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
setuptools_rust_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*-$portVersion-*.whl
packageEntries $pythonPackage \
"$prefix"/lib/$python
done
}