diff options
Diffstat (limited to 'source/d/python3')
-rw-r--r-- | source/d/python3/README | 18 | ||||
-rw-r--r-- | source/d/python3/python.sysconfig.py.x86_64.diff | 33 | ||||
-rwxr-xr-x | source/d/python3/python3.SlackBuild | 50 | ||||
-rw-r--r-- | source/d/python3/python3.distutils.x86_64.diff | 30 | ||||
-rw-r--r-- | source/d/python3/python3.no-static-library.diff | 75 | ||||
-rw-r--r-- | source/d/python3/python3.readline.set_pre_input_hook.diff | 12 | ||||
-rw-r--r-- | source/d/python3/python3.setup.py.x86_64.diff | 11 | ||||
-rw-r--r-- | source/d/python3/slack-desc | 2 |
8 files changed, 25 insertions, 206 deletions
diff --git a/source/d/python3/README b/source/d/python3/README deleted file mode 100644 index 8197d5920..000000000 --- a/source/d/python3/README +++ /dev/null @@ -1,18 +0,0 @@ -Python is an interpreted, interactive, object-oriented programming -language that combines remarkable power with very clear syntax. -Python's basic power can be extended with your own modules written in C -or C++. Python is also adaptable as an extension language for existing -applications. - -Python 3 (a.k.a. "Python 3000" or "Py3k") is a new version of the -language that is incompatible with the 2.x line of releases. The -language is mostly the same, but many details, especially how built-in -objects like dictionaries and strings work, have changed considerably, -and a lot of deprecated features have finally been removed. Also, the -standard library has been reorganized in a few prominent places. - -It is safe to install alongside Slackware's Python 2.x. - -If you'd like to have HTML docs installed, get them from -<https://docs.python.org/3/download.html> (HTML format, .tar.bz2 -archive). diff --git a/source/d/python3/python.sysconfig.py.x86_64.diff b/source/d/python3/python.sysconfig.py.x86_64.diff deleted file mode 100644 index bf5adb0d0..000000000 --- a/source/d/python3/python.sysconfig.py.x86_64.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- ./Lib/sysconfig.py.orig 2020-10-05 10:07:58.000000000 -0500 -+++ ./Lib/sysconfig.py 2020-10-24 17:23:51.323197869 -0500 -@@ -22,7 +22,7 @@ - 'posix_prefix': { - 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', - 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', -- 'purelib': '{base}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{base}/lib64/python{py_version_short}/site-packages', - 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', - 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', -@@ -33,9 +33,9 @@ - }, - 'posix_home': { - 'stdlib': '{installed_base}/lib/python', -- 'platstdlib': '{base}/lib/python', -- 'purelib': '{base}/lib/python', -- 'platlib': '{base}/lib/python', -+ 'platstdlib': '{base}/lib64/python', -+ 'purelib': '{base}/lib64/python', -+ 'platlib': '{base}/lib64/python', - 'include': '{installed_base}/include/python', - 'platinclude': '{installed_base}/include/python', - 'scripts': '{base}/bin', -@@ -64,7 +64,7 @@ - 'posix_user': { - 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', - 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', -- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{userbase}/lib64/python{py_version_short}/site-packages', - 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', - 'scripts': '{userbase}/bin', 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 diff --git a/source/d/python3/python3.distutils.x86_64.diff b/source/d/python3/python3.distutils.x86_64.diff deleted file mode 100644 index 09c6e9669..000000000 --- a/source/d/python3/python3.distutils.x86_64.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- ./Lib/distutils/sysconfig.py.orig 2020-10-05 10:07:58.000000000 -0500 -+++ ./Lib/distutils/sysconfig.py 2020-10-24 17:31:20.860207925 -0500 -@@ -151,7 +151,7 @@ - libdir = sys.platlibdir - else: - # Pure Python -- libdir = "lib" -+ libdir = "lib64" - libpython = os.path.join(prefix, libdir, - "python" + get_python_version()) - if standard_lib: ---- ./Lib/distutils/command/install.py.orig 2020-10-05 10:07:58.000000000 -0500 -+++ ./Lib/distutils/command/install.py 2020-10-24 17:29:58.230206077 -0500 -@@ -29,14 +29,14 @@ - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/lib/python$py_version_short/site-packages', -+ 'purelib': '$base/lib64/python$py_version_short/site-packages', - 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { -- 'purelib': '$base/lib/python', -+ 'purelib': '$base/lib64/python', - 'platlib': '$base/$platlibdir/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', diff --git a/source/d/python3/python3.no-static-library.diff b/source/d/python3/python3.no-static-library.diff deleted file mode 100644 index 3b3afb07c..000000000 --- a/source/d/python3/python3.no-static-library.diff +++ /dev/null @@ -1,75 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Malcolm <dmalcolm@redhat.com> -Date: Mon, 18 Jan 2010 17:59:07 +0000 -Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Downstream only: not appropriate for upstream. - -See https://bugzilla.redhat.com/show_bug.cgi?id=556092 - -Co-authored-by: David Malcolm <dmalcolm@redhat.com> -Co-authored-by: Bohuslav Kabrda <bkabrda@redhat.com> -Co-authored-by: Matej Stuchlik <mstuchli@redhat.com> -Co-authored-by: Robert Kuska <rkuska@redhat.com> -Co-authored-by: Charalampos Stratakis <cstratak@redhat.com> -Co-authored-by: Miro Hrončok <miro@hroncok.cz> ---- - Makefile.pre.in | 21 ++------------------- - 1 file changed, 2 insertions(+), 19 deletions(-) - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 77f91e72b1..bb4069b18a 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -586,7 +586,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c - $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir) - - # Build the interpreter --$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) -+$(BUILDPYTHON): Programs/python.o $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) - - platform: $(BUILDPYTHON) pybuilddir.txt -@@ -634,12 +634,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - -- --# Build static library --$(LIBRARY): $(LIBRARY_OBJS) -- -rm -f $@ -- $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS) -- - libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS) - if test $(INSTSONAME) != $(LDLIBRARY); then \ - $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \ -@@ -721,7 +715,7 @@ Makefile Modules/config.c: Makefile.pre \ - @echo "The Makefile was updated, you may need to re-run make." - - --Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) -+Programs/_testembed: Programs/_testembed.o $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) - - ############################################################################ -@@ -1630,17 +1624,6 @@ libainstall: @DEF_MAKE_RULE@ python-config - else true; \ - fi; \ - done -- @if test -d $(LIBRARY); then :; else \ -- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ -- if test "$(SHLIB_SUFFIX)" = .dll; then \ -- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ -- else \ -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -- fi; \ -- else \ -- echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -- fi; \ -- fi - $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c - $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in diff --git a/source/d/python3/python3.readline.set_pre_input_hook.diff b/source/d/python3/python3.readline.set_pre_input_hook.diff deleted file mode 100644 index b55820c48..000000000 --- a/source/d/python3/python3.readline.set_pre_input_hook.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- ./Modules/readline.c.orig 2009-10-26 21:32:51.000000000 +0200 -+++ ./Modules/readline.c 2010-05-30 14:07:10.000000000 +0300 -@@ -12,6 +12,9 @@ - #include <errno.h> - #include <sys/time.h> - -+/* This seems to be needed for set_pre_input_hook to work */ -+#define HAVE_RL_PRE_INPUT_HOOK 1 -+ - #if defined(HAVE_SETLOCALE) - /* GNU readline() mistakenly sets the LC_CTYPE locale. - * This is evil. Only the user or the app's main() should do this! diff --git a/source/d/python3/python3.setup.py.x86_64.diff b/source/d/python3/python3.setup.py.x86_64.diff deleted file mode 100644 index a7dd2a3b4..000000000 --- a/source/d/python3/python3.setup.py.x86_64.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ./setup.py.orig 2020-10-05 10:07:58.000000000 -0500 -+++ ./setup.py 2020-10-24 17:35:07.299212991 -0500 -@@ -744,7 +744,7 @@ - # directories (i.e. '.' and 'Include') must be first. See issue - # 10520. - if not CROSS_COMPILING: -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - # only change this for cross builds for 3.3, issues on Mageia - if CROSS_COMPILING: diff --git a/source/d/python3/slack-desc b/source/d/python3/slack-desc index ca18863aa..448e00963 100644 --- a/source/d/python3/slack-desc +++ b/source/d/python3/slack-desc @@ -6,7 +6,7 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -python3: python3 (object-oriented interpreted programming language v3) +python3: python3 (object-oriented interpreted programming language, v3) python3: python3: Python is an interpreted, interactive, object-oriented programming python3: language that combines remarkable power with very clear syntax. |