diff --git a/dev-python/chardet/chardet-4.0.0.recipe b/dev-python/chardet/chardet-4.0.0.recipe index c8cc52a09..0544abcf1 100644 --- a/dev-python/chardet/chardet-4.0.0.recipe +++ b/dev-python/chardet/chardet-4.0.0.recipe @@ -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\ - \"" -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - 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 + \"" + # 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,13 +66,19 @@ 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-$pythonVersion + done + + # And provide suffix-less symlinks for the default version + if [ $pythonVersion = $defaultVersion ]; then for f in $binDir/*; do - mv $f ${f}$commandSuffix + ln -sr $f ${f%-$pythonVersion} done fi - packageEntries $pythonPackage \ + packageEntries $pythonPackage \ $prefix/lib/python* \ $binDir done diff --git a/dev-python/html2text/html2text-2020.1.16.recipe b/dev-python/html2text/html2text-2020.1.16.recipe index 4970ddc12..f50066dac 100644 --- a/dev-python/html2text/html2text-2020.1.16.recipe +++ b/dev-python/html2text/html2text-2020.1.16.recipe @@ -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\ - \"" -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - 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 + \"" + # 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,13 +71,19 @@ 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-$pythonVersion + done + + # And provide suffix-less symlinks for the default version + if [ $pythonVersion = $defaultVersion ]; then for f in $binDir/*; do - mv $f ${f}$commandSuffix + ln -sr $f ${f%-$pythonVersion} done fi - packageEntries $pythonPackage \ + packageEntries $pythonPackage \ $prefix/lib/python* \ $binDir done diff --git a/dev-python/mutagen/mutagen-1.47.0.recipe b/dev-python/mutagen/mutagen-1.47.0.recipe index 5007e2bf7..efb0fb397 100644 --- a/dev-python/mutagen/mutagen-1.47.0.recipe +++ b/dev-python/mutagen/mutagen-1.47.0.recipe @@ -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\ - \"" -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - 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 + \"" + # 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,13 +84,19 @@ INSTALL() --root=/ --prefix=$prefix \ --install-data=$dataDir - if [ "$pythonVersion" = "$commandSuffix" ]; then + # 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 - mv $f ${f}$commandSuffix + ln -sr $f ${f%-$pythonVersion} done fi - packageEntries $pythonPackage \ + packageEntries $pythonPackage \ $prefix/lib/python* \ $binDir done diff --git a/dev-python/python-ly/python_ly-0.9.7.recipe b/dev-python/python-ly/python_ly-0.9.7.recipe index 2313dd864..9167f09c2 100644 --- a/dev-python/python-ly/python_ly-0.9.7.recipe +++ b/dev-python/python-ly/python_ly-0.9.7.recipe @@ -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\ - \"" -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - 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: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 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-$pythonVersion + done + + # And provide suffix-less symlinks for the default version + if [ $pythonVersion = $defaultVersion ]; then for f in $binDir/*; do - mv $f ${f}$commandSuffix + ln -sr $f ${f%-$pythonVersion} done fi