69 lines
1.8 KiB
Bash
69 lines
1.8 KiB
Bash
SUMMARY="Backport of new features in Python's weakref module"
|
|
DESCRIPTION="This package provides backports of new features in Python's \
|
|
weakref_ module under the backports_ namespace."
|
|
HOMEPAGE="https://github.com/pjdelport/backports.weakref/"
|
|
COPYRIGHT="2016-2017 Pi Delport"
|
|
LICENSE="PSF-2.3"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/PiDelport/backports.weakref/archive/refs/tags/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="7e7457e61879db43b12b20d05acc3ef5bc6748adf37c6a4d9514316ba990a141"
|
|
SOURCE_FILENAME="backports-weakref-v$portVersion.tar.gz"
|
|
SOURCE_DIR="backports.weakref-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
"
|
|
|
|
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\
|
|
\""
|
|
BUILD_REQUIRES="$BUILD_REQUIRES
|
|
setuptools_scm_$pythonPackage"
|
|
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
|
cmd:python$pythonVersion"
|
|
done
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION
|
|
|
|
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
|
|
}
|