diff options
Diffstat (limited to '')
-rwxr-xr-x | source/d/python3/python3.SlackBuild | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/source/d/python3/python3.SlackBuild b/source/d/python3/python3.SlackBuild index d7a577a3b..89647f3fa 100755 --- a/source/d/python3/python3.SlackBuild +++ b/source/d/python3/python3.SlackBuild @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 2012-2017 Audrius Kažukauskas <audrius@neutrino.lt> -# Copyright 2017, 2018, 2019, 2024 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2017, 2018, 2019, 2023, 2024 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -58,6 +58,8 @@ mkdir -p $TMP $PKG # Python gets the compile options right without any help. if [ "$ARCH" = "i586" ]; then LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then @@ -66,6 +68,10 @@ elif [ "$ARCH" = "arm" ]; then LIBDIRSUFFIX="" elif [ "$ARCH" = "armel" ]; then LIBDIRSUFFIX="" +elif [ "$ARCH" = "aarch64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" fi # Location for Python site-packages: @@ -78,24 +84,12 @@ rm -rf $SRCNAM-$VERSION tar xf $CWD/$SRCNAM-$VERSION.tar.xz || exit 1 cd $SRCNAM-$VERSION || exit 1 -zcat $CWD/python3.readline.set_pre_input_hook.diff.gz | patch -p1 --verbose || exit 1 - -# We don't want a large libpython*.a. -zcat $CWD/python3.no-static-library.diff.gz | patch -p1 --verbose || exit 1 - -if [ "$ARCH" = "x86_64" ]; then - # Install to lib64 instead of lib. - zcat $CWD/python.sysconfig.py.x86_64.diff.gz | patch -p1 --verbose || exit 1 - zcat $CWD/python3.distutils.x86_64.diff.gz | patch -p1 --verbose || exit 1 - zcat $CWD/python3.setup.py.x86_64.diff.gz | patch -p1 --verbose || exit 1 -fi - # Fix python3 path in cgi.py. sed -i '1s|^#.*/usr/local/bin/python|#!/usr/bin/python3|' Lib/cgi.py -# If system we're building on already has Python3 with pip in site-packages, -# ignore it and install pip anyway. -sed -i 's|\("install",\)|\1 "--ignore-installed",|' Lib/ensurepip/__init__.py +## If system we're building on already has Python3 with pip in site-packages, +## ignore it and install pip anyway. +#sed -i 's|\("install",\)|\1 "--ignore-installed",|' Lib/ensurepip/__init__.py chown -R root:root . find -L . \ @@ -112,10 +106,14 @@ find -L . \ --docdir=/usr/doc/$PKGNAM-$VERSION \ --enable-ipv6 \ --enable-shared \ + --with-computed-gotos \ + --enable-optimizations \ + --with-dbmliborder=gdbm:ndbm \ --with-system-expat \ --with-system-ffi \ --enable-loadable-sqlite-extensions \ --without-ensurepip \ + --with-tzpath=/usr/share/zoneinfo \ --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 @@ -127,12 +125,11 @@ make install DESTDIR=$PKG || exit 1 ln -sf python${BRANCH_VERSION} python ) -## NOPE, let's try using -I instead. -## Add a symlink to cpython include directory to fix various builds that -## do not expect the new location: -#( cd $PKG/usr/include -# ln -sf python?.?/cpython . -#) +# We don't want a large libpython*.a. +find $PKG -name "libpython*.a" -exec rm --verbose "{}" \; + +# Make sure we have a non-platform-specific site-packages directory: +mkdir -p $PKG/usr/lib/python${BRANCH_VERSION}/site-packages # We'll install the python-tools under site-packages. mkdir -p $SITEPK |