Files
haikuports/dev-python/cppy/cppy-1.2.1.recipe
OscarL 70ac5cadda python3.8: bulk removal of now obsolete "_python38" packages. (#9328)
* python3.8: bulk removal of now obsolete "_python38" packages.

Done via scripting. No functional change intended or expected.

Some manual tweaks will follow.

* python3.8: further manual tweaks after bulk-3.8-removal.

Unlike the previous commit with automated changes,
I've tested builds for *these* recipes in beta4 64 bits.
2023-09-01 18:19:50 +00:00

60 lines
1.7 KiB
Bash

SUMMARY="Makes Python extensions easier to write"
DESCRIPTION="A small C++ header library which makes it easier to write Python extension modules.\
The primary feature is a PyObject smart pointer which automatically handles reference counting \
and provides convenience methods for performing common object operations."
HOMEPAGE="https://github.com/nucleic/cppy/"
COPYRIGHT="2014-2022, Nucleic Development Team"
LICENSE="BSD (3-clause)"
REVISION="2"
pypiVersion="31/5e/b8faf2b2aeb679c0f4359fd1a4716fe90d65f72f72639413ffb95f3c3b46"
SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/$portName-$portVersion-py3-none-any.whl#noarchive"
CHECKSUM_SHA256='c5b5eac3d3f42593a07d35275b0bc27f447b76b9ad8f27c62e3cfa286dc1988a'
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\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\
\""
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
installer_$pythonPackage
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 -m installer -p $prefix $portName-$portVersion-py3-none-any.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}