unrardll: update to version 0.1.7, support Python 3.10. (#9474)

Also switch to build with "build + installer".
This commit is contained in:
OscarL
2023-09-21 01:38:52 -03:00
committed by GitHub
parent d101e25cde
commit 98f1f38f40

View File

@@ -4,9 +4,9 @@ HOMEPAGE="https://github.com/kovidgoyal/unrardll
https://pypi.org/project/unrardll/"
COPYRIGHT="2017 Kovid Goyal"
LICENSE="BSD (3-clause)"
REVISION="6"
REVISION="1"
SOURCE_URI="https://github.com/kovidgoyal/unrardll/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="88c23a76492cf0d4aef5861947064698984c930294776dc66e9c46c2004ff0a2"
CHECKSUM_SHA256="ac89d56d1690862b66ee684564c1357e105f9bd8d88d52f9d112c2718bd6f116"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
@@ -23,8 +23,8 @@ BUILD_REQUIRES="
devel:libunrar$secondaryArchSuffix
"
PYTHON_PACKAGES=(python39)
PYTHON_VERSIONS=(3.9)
PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
@@ -41,11 +41,14 @@ for i in "${!PYTHON_PACKAGES[@]}"; do
eval "REQUIRES_$pythonPackage=\"
haiku
lib:libunrar$secondaryArchSuffix
cmd:python$pythonVersion
lib:libunrar$secondaryArchSuffix
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
@@ -56,18 +59,16 @@ 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*
rm -rf dist
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*.whl
packageEntries ${PYTHON_PACKAGES[i]} \
"$prefix"/lib/python*
done
}