diff options
Diffstat (limited to 'source/d/python-setuptools/python-setuptools.SlackBuild')
-rwxr-xr-x | source/d/python-setuptools/python-setuptools.SlackBuild | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/source/d/python-setuptools/python-setuptools.SlackBuild b/source/d/python-setuptools/python-setuptools.SlackBuild index 366b4f9c5..694f68ac4 100755 --- a/source/d/python-setuptools/python-setuptools.SlackBuild +++ b/source/d/python-setuptools/python-setuptools.SlackBuild @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 2013-2014 Audrius Kažukauskas <audrius@neutrino.lt> -# Copyright 2014, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2014, 2017, 2018, 2022 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -47,6 +47,21 @@ if [ -z "$ARCH" ]; then esac fi +if [ "$ARCH" = "i586" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + LIBDIRSUFFIX="" +else + LIBDIRSUFFIX="" +fi + + # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information # could be useful to other scripts. @@ -73,6 +88,17 @@ find -L . \ rm -f setuptools/*.exe +# Recent Python versions support both a libdir (for pure Python modules) and a +# platlib (for $ARCH specific modules). We've always patched Python to use +# the platform directory (such as /usr/lib64/python3.9/site-packages on x86_64) +# for all modules. Perhaps we will rethink this, but since an installed +# setuptools now takes priority for reporting the libdir (and this no longer +# matches the platlib on architectures such as x86_64), let's patch setuptools +# to agree with Python: +if [ "$LIBDIRSUFFIX" = "64" ]; then + zcat $CWD/setuptools.x86_64.diff.gz | patch -p1 --verbose || exit 1 +fi + python3 setup.py install --root=$PKG || exit 1 mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION |