mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
*_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.
This commit is contained in:
@@ -3,7 +3,7 @@ DESCRIPTION="Python module for character encoding auto-detection."
|
||||
HOMEPAGE="https://github.com/chardet/chardet"
|
||||
COPYRIGHT="2011-2022 Mark Pilgrim, Dan Blanchard"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="5"
|
||||
REVISION="6"
|
||||
SOURCE_URI="https://pypi.io/packages/source/${portName:0:1}/$portName/${portName}-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"
|
||||
|
||||
@@ -20,34 +20,41 @@ BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
commandSuffixes=(3.8 "" 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\n\
|
||||
cmd:chardetect$commandSuffix = $portVersion\n\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
defaultVersion=3.10
|
||||
|
||||
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:chardetect_$pythonVersion = $portVersion
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
# Provide non-suffixed cmd only for the default Python version
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
eval "PROVIDES_$pythonPackage+=\"
|
||||
cmd:chardetect = $portVersion
|
||||
\""
|
||||
fi
|
||||
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
|
||||
BUILD_REQUIRES+="
|
||||
setuptools_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
@@ -59,9 +66,15 @@ INSTALL()
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
if [ "$pythonVersion" = "$commandSuffix" ]; then
|
||||
# Version suffix all the scripts
|
||||
for f in $binDir/*; do
|
||||
mv $f ${f}$commandSuffix
|
||||
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
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ HOMEPAGE="https://github.com/html2text/html2text.py
|
||||
https://pypi.python.org/pypi/html2text"
|
||||
COPYRIGHT="2004-2008 Aaron Swartz"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="4"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://github.com/Alir3z4/html2text/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="209a2c4d7897e83a6999160ef51ae71bdb8c3eede99e103f12edb25199d4d11e"
|
||||
|
||||
@@ -25,34 +25,41 @@ BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
commandSuffixes=(3.8 "" 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\n\
|
||||
cmd:html2text$commandSuffix = $portVersion\n\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
defaultVersion=3.10
|
||||
|
||||
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:html2text_$pythonVersion = $portVersion
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
# Provide non-suffixed cmd only for the default Python version
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
eval "PROVIDES_$pythonPackage+=\"
|
||||
cmd:html2text = $portVersion
|
||||
\""
|
||||
fi
|
||||
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
|
||||
BUILD_REQUIRES+="
|
||||
setuptools_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
@@ -64,9 +71,15 @@ INSTALL()
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
if [ "$pythonVersion" = "$commandSuffix" ]; then
|
||||
# Version suffix all the scripts
|
||||
for f in $binDir/*; do
|
||||
mv $f ${f}$commandSuffix
|
||||
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
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Ogg streams on an individual packet/page level."
|
||||
HOMEPAGE="https://github.com/quodlibet/mutagen"
|
||||
COPYRIGHT="Joe Wreschnig, Michael Urman, Lukáš Lalinský, Christoph Reiter, Ben Ockmore & others"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/m/$portName/$portName-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99"
|
||||
SOURCE_DIR="mutagen-$portVersion"
|
||||
@@ -27,39 +27,51 @@ BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
commandSuffixes=(3.8 "" 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\n\
|
||||
cmd:mid3cp$commandSuffix\n\
|
||||
cmd:mid3iconv$commandSuffix\n\
|
||||
cmd:mid3v2$commandSuffix\n\
|
||||
cmd:moggsplit$commandSuffix\n\
|
||||
cmd:mutagen_inspect$commandSuffix\n\
|
||||
cmd:mutagen_pony$commandSuffix\n\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
defaultVersion=3.10
|
||||
|
||||
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:mid3cp_$pythonVersion = $portVersion
|
||||
cmd:mid3iconv_$pythonVersion = $portVersion
|
||||
cmd:mid3v2_$pythonVersion = $portVersion
|
||||
cmd:moggsplit_$pythonVersion = $portVersion
|
||||
cmd:mutagen_inspect_$pythonVersion = $portVersion
|
||||
cmd:mutagen_pony_$pythonVersion = $portVersion
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
# Provide non-suffixed cmd only for the default Python version
|
||||
if [ $pythonVersion = $defaultVersion ]; then
|
||||
eval "PROVIDES_$pythonPackage+=\"
|
||||
cmd:mid3cp = $portVersion
|
||||
cmd:mid3iconv = $portVersion
|
||||
cmd:mid3v2 = $portVersion
|
||||
cmd:moggsplit = $portVersion
|
||||
cmd:mutagen_inspect = $portVersion
|
||||
cmd:mutagen_pony = $portVersion
|
||||
\""
|
||||
fi
|
||||
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
|
||||
BUILD_REQUIRES+="
|
||||
setuptools_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
@@ -72,9 +84,15 @@ INSTALL()
|
||||
--root=/ --prefix=$prefix \
|
||||
--install-data=$dataDir
|
||||
|
||||
if [ "$pythonVersion" = "$commandSuffix" ]; then
|
||||
# Version suffix all the scripts
|
||||
for f in $binDir/*; do
|
||||
mv $f ${f}$commandSuffix
|
||||
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
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Wilbert Berendsen."
|
||||
HOMEPAGE="https://github.com/frescobaldi/python-ly/"
|
||||
COPYRIGHT="2008-2015 Wilbert Berendsen"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="4"
|
||||
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"
|
||||
@@ -28,47 +28,63 @@ REQUIRES="
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
commandSuffixes=(38 "" 310)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\n\
|
||||
${portName}_$pythonPackage = $portVersion\n\
|
||||
cmd:ly$commandSuffix = $portVersion\n\
|
||||
cmd:ly_server$commandSuffix = $portVersion\n\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\n\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\n\
|
||||
|
||||
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
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
# 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 i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
commandSuffix=${commandSuffixes[$i]}
|
||||
pythonPackageName=${portName}_$pythonPackage-$portFullVersion
|
||||
pythonLinksDir=$(dirname $portPackageLinksDir)/$pythonPackageName
|
||||
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
|
||||
|
||||
if [ $pythonPackage = python$commandSuffix ]; then
|
||||
# Version suffix all the scripts
|
||||
for f in $binDir/*; do
|
||||
mv $f ${f}$commandSuffix
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user