Files
haikuports/dev-python/python-ly/python_ly-0.9.7.recipe
OscarL 0922e64579 *_python*: clean up around commands suffixes. Drop Python3.9 support. (#12591)
Plus general recipe clean ups, while we're at it.

----

Tested locally only for mutagen. Will fix if something breaks.

`requests_python39` will pop up in in the reports due to missing `chardet_python39`.
Nothing requires `requests_python39` on tree, so will remove that at some point.
2025-07-14 20:48:47 -03:00

96 lines
2.5 KiB
Bash

SUMMARY="Tool and library for manipulating LilyPond files"
DESCRIPTION="This package provides a Python library ly containing various Python modules to \
parse, manipulate or create documents in LilyPond format. A command line program ly is also \
provided that can be used to do various manipulations with LilyPond files.
The LilyPond format is a plain text input format that is used by the GNU music typesetter \
LilyPond (www.lilypond.org).
The python-ly package is Free Software, licensed under the GPL. This package is written by the \
Frescobaldi developers and is used extensively by the Frescobaldi project. The main author is \
Wilbert Berendsen."
HOMEPAGE="https://github.com/frescobaldi/python-ly/"
COPYRIGHT="2008-2015 Wilbert Berendsen"
LICENSE="GNU GPL v2"
REVISION="5"
SOURCE_URI="https://pypi.io/packages/source/p/python-ly/python-ly-$portVersion.tar.gz"
CHECKSUM_SHA256="d4d2b68eb0ef8073200154247cc9bd91ed7fb2671ac966ef3d2853281c15d7a8"
SOURCE_FILENAME="python-ly-$portVersion.tar.gz"
SOURCE_DIR="python-ly-$portVersion"
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:ly_$pythonVersion = $portVersion
cmd:ly_server_$pythonVersion = $portVersion
\""
# Provide non-suffixed cmd only for the default Python version
if [ $pythonVersion = $defaultVersion ]; then
eval "PROVIDES_$pythonPackage+=\"
cmd:ly = $portVersion
cmd:ly_server = $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-$pythonVersion
done
# And provide suffix-less symlinks for the default version
if [ $pythonVersion = $defaultVersion ]; then
for f in $binDir/*; do
ln -sr $f ${f%-$pythonVersion}
done
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir
done
}