summaryrefslogtreecommitdiffstats
path: root/source/d/python3/python3.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/python3/python3.SlackBuild')
-rwxr-xr-xsource/d/python3/python3.SlackBuild50
1 files changed, 24 insertions, 26 deletions
diff --git a/source/d/python3/python3.SlackBuild b/source/d/python3/python3.SlackBuild
index c437325c4..89647f3fa 100755
--- a/source/d/python3/python3.SlackBuild
+++ b/source/d/python3/python3.SlackBuild
@@ -1,9 +1,7 @@
#!/bin/bash
-# Slackware build script for python3
-
# Copyright 2012-2017 Audrius Kažukauskas <audrius@neutrino.lt>
-# Copyright 2017, 2018, 2019 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
@@ -60,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
@@ -68,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:
@@ -80,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 . \
@@ -114,24 +106,30 @@ 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
make install DESTDIR=$PKG || exit 1
-# Remove to avoid overwriting a copy from Python2.
-rm -f $PKG/usr/bin/2to3
+# PEP says we can claim this link:
+( cd $PKG/usr/bin
+ rm -f python
+ ln -sf python${BRANCH_VERSION} python
+)
+
+# We don't want a large libpython*.a.
+find $PKG -name "libpython*.a" -exec rm --verbose "{}" \;
-## 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 .
-#)
+# 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