mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
dev-python/cryptography: Add newer rust-based 3.4.8
* There are ABI breakages, so leaving 3.3.x for now
This commit is contained in:
88
dev-python/cryptography/cryptography-3.4.8.recipe
Normal file
88
dev-python/cryptography/cryptography-3.4.8.recipe
Normal file
@@ -0,0 +1,88 @@
|
||||
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="1"
|
||||
SOURCE_URI="https://pypi.io/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
|
||||
devel:libffi$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:rustc$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
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku$secondaryArchSuffix
|
||||
asn1crypto_$pythonPackage
|
||||
cffi_$pythonPackage
|
||||
idna_$pythonPackage
|
||||
pyasn1_$pythonPackage
|
||||
six_$pythonPackage
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libpython$pythonVersion$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
\""
|
||||
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
||||
eval "PROVIDES_${pythonPackage}+=\"\n\
|
||||
cryptography_$pythonPackage = $portVersion\
|
||||
\""
|
||||
fi
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
pip_$pythonPackage
|
||||
setuptools_$pythonPackage
|
||||
setuptools_rust_$pythonPackage
|
||||
wheel_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
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
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py build install \
|
||||
--optimize=1 \
|
||||
--root=/ --prefix="$prefix"
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user