Files
haikuports/dev-python/breathe/breathe-4.35.0.recipe
OscarL a6bff52757 _python* packages: do not use Python 3.9 as "defaultVersion" anymore. (#12589)
While switching to 3.10 as default, lets just drop the 3.9 versions of these packages.

----

Checked runtime and build dependencies, but only tried a build of `hatchling` locally. I'll merge as is, and if something breaks, will fix later on.
2025-07-14 15:09:48 -03:00

85 lines
1.9 KiB
Bash

SUMMARY="A Sphinx Doxygen renderer"
DESCRIPTION="Breathe is an extension to reStructuredText and Sphinx to be able to read and render \
Doxygen xml output."
HOMEPAGE="https://github.com/michaeljones/breathe"
COPYRIGHT="2009, Michael Jones"
LICENSE="BSD (2-clause)"
REVISION="2"
SOURCE_URI="https://files.pythonhosted.org/packages/source/b/breathe/breathe-$portVersion.tar.gz"
CHECKSUM_SHA256="5165541c3c67b6c7adde8b3ecfe895c6f7844783c4076b6d8d287e4f33d62386"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
defaultVersion=3.10
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
cmd:breathe_apidoc_$pythonVersion.py = $portVersion
\""
# Provide non-suffixed cmd only for the default Python version
if [ $pythonVersion = $defaultVersion ]; then
eval "PROVIDES_$pythonPackage+=\"
cmd:breathe_apidoc = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
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
# Version suffix all the scripts
for f in $binDir/*; do
mv $f ${f%.py}-${pythonVersion}.py
done
# And provide suffix-less symlinks for the default version
if [ $pythonVersion = $defaultVersion ]; then
for f in $binDir/*; do
ln -sr $f ${f%-$pythonVersion.py}
done
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir
done
}