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.
This commit is contained in:
OscarL
2025-02-03 10:42:12 -03:00
committed by GitHub
parent a5e7de042c
commit c50b5fadd6
5 changed files with 175 additions and 164 deletions

View File

@@ -5,7 +5,7 @@ HOMEPAGE="https://pypi.org/project/argon2-cffi-bindings/
https://github.com/hynek/argon2-cffi-bindings/"
COPYRIGHT="2021 Hynek Schlawack"
LICENSE="MIT"
REVISION="4"
REVISION="5"
pypi="184b8ccce6683b0aa2fbb7ba5683ea4b9c5763f1356347f1312c32e3c66e"
SOURCE_URI="https://files.pythonhosted.org/packages/b9/e9/$pypi/argon2-cffi-bindings-$portVersion.tar.gz"
CHECKSUM_SHA256="bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3"
@@ -32,11 +32,11 @@ BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
"
PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
PYTHON_VERSIONS=(3.10)
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
@@ -46,14 +46,16 @@ for i in "${!PYTHON_PACKAGES[@]}"; do
argon2_cffi_bindings_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku
cffi${secondaryArchSuffix}_$pythonPackage
cffi_$pythonPackage
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
cffi${secondaryArchSuffix}_$pythonPackage
build_$pythonPackage
cffi_$pythonPackage
installer_$pythonPackage
setuptools_scm_$pythonPackage
wheel_$pythonPackage
@@ -68,17 +70,16 @@ INSTALL()
export ARGON2_CFFI_USE_SYSTEM=1
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
for i in "${!PYTHON_PACKAGES[@]}"; do
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
rm -rf dist
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*.whl
$python -m installer --p $prefix dist/*-$portVersion-cp${pythonVersion//.}-*.whl
packageEntries ${PYTHON_PACKAGES[i]} \
packageEntries $pythonPackage \
$prefix/lib/python*
done
}