Files
haikuports/dev-python/argon2-cffi-bindings/argon2_cffi_bindings-21.2.0.recipe
OscarL c50b5fadd6 cffi: clean up recipe, drop Python 3.9. (#11708)
On-tree recipes that depend on cffi:

- argon2_cffi_bindings
- bcrypt
- pycares
- pynacl

So we're doing the same on those too in one go.

Also:

- moved all recipes to use build/installer instead of setup.py.
- fixed calling of tests on cffi.
2025-02-03 13:42:12 +00:00

86 lines
2.2 KiB
Bash

SUMMARY="Low-level Python CFFI Bindings for Argon2"
DESCRIPTION="argon2-cffi-bindings provides low-level bindings to the Argon2 password hashing \
algorithm including a vendored version of them."
HOMEPAGE="https://pypi.org/project/argon2-cffi-bindings/
https://github.com/hynek/argon2-cffi-bindings/"
COPYRIGHT="2021 Hynek Schlawack"
LICENSE="MIT"
REVISION="5"
pypi="184b8ccce6683b0aa2fbb7ba5683ea4b9c5763f1356347f1312c32e3c66e"
SOURCE_URI="https://files.pythonhosted.org/packages/b9/e9/$pypi/argon2-cffi-bindings-$portVersion.tar.gz"
CHECKSUM_SHA256="bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3"
SOURCE_DIR="argon2-cffi-bindings-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libargon2$secondaryArchSuffix
lib:libffi$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libargon2$secondaryArchSuffix
devel:libffi$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$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+=\"
argon2_cffi_bindings_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku
cffi_$pythonPackage
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
cffi_$pythonPackage
installer_$pythonPackage
setuptools_scm_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
export ARGON2_CFFI_USE_SYSTEM=1
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
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-cp${pythonVersion//.}-*.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}