fasteners: update to version 0.18, support Python 3.10. (#9446)

This commit is contained in:
OscarL
2023-09-19 01:29:34 -03:00
committed by GitHub
parent f189ddc981
commit eb11d2e31c
2 changed files with 60 additions and 58 deletions

View File

@@ -1,58 +0,0 @@
SUMMARY="A python package that provides useful locks"
DESCRIPTION="Python cross platform locks for threads and processes."
HOMEPAGE="https://github.com/harlowja/fasteners"
LICENSE="Apache v2"
COPYRIGHT="2014-2021 fasteners authors"
REVISION="4"
SOURCE_URI="https://pypi.python.org/packages/source/f/fasteners/fasteners-$portVersion.tar.gz"
CHECKSUM_SHA256="c995d8c26b017c5d6a6de9ad29a0f9cdd57de61ae1113d28fac26622b06a0933"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python39)
PYTHON_VERSIONS=(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\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
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
}

View File

@@ -0,0 +1,60 @@
SUMMARY="A python package that provides useful locks"
DESCRIPTION="Python cross platform locks for threads and processes."
HOMEPAGE="https://github.com/harlowja/fasteners"
LICENSE="Apache v2"
COPYRIGHT="2014-2022 fasteners authors"
REVISION="1"
SOURCE_URI="https://pypi.python.org/packages/source/f/fasteners/fasteners-$portVersion.tar.gz"
CHECKSUM_SHA256="cb7c13ef91e0c7e4fe4af38ecaf6b904ec3f5ce0dda06d34924b6b74b869d953"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
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
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*.whl
packageEntries ${PYTHON_PACKAGES[i]} \
"$prefix"/lib/python*
done
}