diff options
Diffstat (limited to 'source/d/python-setuptools')
-rwxr-xr-x | source/d/python-setuptools/python-setuptools.SlackBuild | 28 | ||||
-rw-r--r-- | source/d/python-setuptools/setuptools.x86_64.diff | 31 |
2 files changed, 58 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 diff --git a/source/d/python-setuptools/setuptools.x86_64.diff b/source/d/python-setuptools/setuptools.x86_64.diff new file mode 100644 index 000000000..a9731d738 --- /dev/null +++ b/source/d/python-setuptools/setuptools.x86_64.diff @@ -0,0 +1,31 @@ +--- ./setuptools/_distutils/sysconfig.py.orig 2022-08-21 02:05:13.000000000 -0500 ++++ ./setuptools/_distutils/sysconfig.py 2022-08-21 13:33:52.738969315 -0500 +@@ -234,7 +234,7 @@ + libdir = getattr(sys, "platlibdir", "lib") + else: + # Pure Python +- libdir = "lib" ++ libdir = "lib64" + implementation = 'pypy' if IS_PYPY else 'python' + libpython = os.path.join(prefix, libdir, implementation + get_python_version()) + return _posix_lib(standard_lib, libpython, early_prefix, prefix) +--- ./setuptools/_distutils/command/install.py.orig 2022-08-21 13:33:52.738969315 -0500 ++++ ./setuptools/_distutils/command/install.py 2022-08-21 13:35:11.919964935 -0500 +@@ -34,7 +34,7 @@ + + INSTALL_SCHEMES = { + 'posix_prefix': { +- 'purelib': '{base}/lib/{implementation_lower}{py_version_short}/site-packages', ++ 'purelib': '{base}/lib64/{implementation_lower}{py_version_short}/site-packages', + 'platlib': '{platbase}/{platlibdir}/{implementation_lower}' + '{py_version_short}/site-packages', + 'headers': '{base}/include/{implementation_lower}' +@@ -43,7 +43,7 @@ + 'data': '{base}', + }, + 'posix_home': { +- 'purelib': '{base}/lib/{implementation_lower}', ++ 'purelib': '{base}/lib64/{implementation_lower}', + 'platlib': '{base}/{platlibdir}/{implementation_lower}', + 'headers': '{base}/include/{implementation_lower}/{dist_name}', + 'scripts': '{base}/bin', |