mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
cppy: new recipe (#8087)
This commit is contained in:
59
dev-python/cppy/cppy-1.2.1.recipe
Normal file
59
dev-python/cppy/cppy-1.2.1.recipe
Normal file
@@ -0,0 +1,59 @@
|
||||
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="1"
|
||||
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=(python38 python39 python310)
|
||||
PYTHON_VERSIONS=(3.8 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
|
||||
}
|
||||
Reference in New Issue
Block a user