mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 00:00:07 +02:00
argon2-cffi-bindings, new recipe (#6795)
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
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="1"
|
||||
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=(python3 python38 python39)
|
||||
PYTHON_VERSIONS=(3.7 3.8 3.9)
|
||||
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()
|
||||
{
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user