mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 01:30:07 +02:00
* argon2_cffi_bindings, fix versioning * argon2_cffi_bindings, python cleanup, add python3.10
78 lines
2.1 KiB
Bash
78 lines
2.1 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="2"
|
|
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
|
|
cmd:git
|
|
"
|
|
|
|
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\
|
|
\"; \
|
|
REQUIRES_$pythonPackage=\"\
|
|
haiku\n\
|
|
cmd:python$pythonVersion\n\
|
|
cffi${secondaryArchSuffix}_$pythonPackage\
|
|
\""
|
|
BUILD_REQUIRES="$BUILD_REQUIRES
|
|
pip_$pythonPackage
|
|
setuptools_scm_$pythonPackage
|
|
wheel_$pythonPackage"
|
|
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
|
cmd:python$pythonVersion"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
export ARGON2_CFFI_USE_SYSTEM=1
|
|
|
|
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
|
|
$python setup.py build install \
|
|
--root=/ --prefix=$prefix
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|