mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
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.
83 lines
1.9 KiB
Bash
83 lines
1.9 KiB
Bash
SUMMARY="Python binding to libsodium"
|
|
DESCRIPTION="PyNaCl provides Python binding to the libsodium library."
|
|
HOMEPAGE="https://pypi.python.org/pypi/PyNaCl"
|
|
COPYRIGHT="2013,2018 Donald Stufft and individual contributors"
|
|
LICENSE="Apache v2"
|
|
REVISION="3"
|
|
SOURCE_URI="https://pypi.io/packages/source/p/pynacl/PyNaCl-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba"
|
|
SOURCE_DIR="PyNaCl-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libsodium$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}+=\"
|
|
pynacl_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
cffi_$pythonPackage
|
|
cmd:python$pythonVersion
|
|
lib:libsodium$secondaryArchSuffix
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
build_$pythonPackage
|
|
cffi_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
export SODIUM_INSTALL=system
|
|
|
|
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
|
|
|
|
install -m 755 -d "$docDir"
|
|
install -m 644 -t "$docDir" README.rst
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|