python3, python3-tkinter: update to 3.12.0

Also mark this installation as "externally managed" to prevent users
from installing system-wide packages using pip.

Closes: #43735.
This commit is contained in:
Andrew J. Hesford 2023-09-23 14:56:40 -04:00
parent 2d42eed19a
commit a3c8698631
9 changed files with 77 additions and 94 deletions

View File

@ -7,7 +7,7 @@ py2_lib="usr/lib/python${py2_ver}"
py2_sitelib="${py2_lib}/site-packages"
py2_inc="usr/include/python${py2_ver}"
py3_ver="3.11"
py3_ver="3.12"
py3_abiver=""
py3_lib="usr/lib/python${py3_ver}"
py3_sitelib="${py3_lib}/site-packages"

View File

@ -238,7 +238,7 @@ hook() {
generic_wrapper3 libetpan-config
generic_wrapper3 giblib-config
python_wrapper python-config 2.7
python_wrapper python3-config 3.11
python_wrapper python3-config 3.12
apr_apu_wrapper apr-1-config
apr_apu_wrapper apu-1-config
}

View File

@ -1720,8 +1720,8 @@ libportaudio.so.2 portaudio-19.20140130_1
libportaudiocpp.so.0 portaudio-cpp-19.20140130_1
libdar.so.6000 libdar-2.6.6_1
libdar64.so.6000 libdar-2.6.6_1
libpython3.so python3-3.9.2_2
libpython3.11.so.1.0 python3-3.11.0_1
libpython3.so python3-3.12.0_1
libpython3.12.so.1.0 python3-3.12.0_1
libbrscandec2.so.1 brother-brscan3-0.2.11_2
libxmlrpc_server_abyss.so.3 xmlrpc-c-1.51.06_2
libxmlrpc++.so.8 xmlrpc-c-1.51.06_2

View File

@ -8,7 +8,7 @@
_desc="Python programming language"
pkgname=python3-tkinter
version=3.11.5
version=3.12.0
revision=1
build_style="gnu-configure"
configure_args="--enable-shared --enable-ipv6 --enable-optimizations
@ -27,23 +27,22 @@ short_desc="${_desc} - GUI toolkit for Python3"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
homepage="https://www.python.org"
license="Python-2.0"
distfiles="https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz"
checksum=85cd12e9cf1d6d5a45f17f7afe1cebe7ee628d3282281c492e86adf636defa3f
distfiles="https://www.python.org/ftp/python/${version%rc*}/Python-${version}.tar.xz"
checksum=795c34f44df45a0e9b9710c8c71c15c671871524cd412ca14def212e8ccb155d
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3"
configure_args+=" --with-build-python=python3.11"
configure_args+=" --with-build-python=python${py3_ver}"
fi
post_extract() {
# Ensure that internal copies of expat and libffi are not used.
# Ensure that the internal copy of expat is not used
rm -r Modules/expat
rm -r Modules/_ctypes/{darwin,libffi}*
}
post_patch() {
if [ "$CROSS_BUILD" ]; then
patch -Np0 -i ${FILESDIR}/cross.patch
if [ -n "$CROSS_BUILD" ]; then
patch -Np1 -i ${FILESDIR}/cross.patch
fi
}

View File

@ -0,0 +1,29 @@
[externally-managed]
Error=
This system-wide Python installation is managed by the Void Linux package
manager, XBPS. Installation of Python packages from other sources is not
normally allowed.
To install a Python package not offered by Void Linux, consider using a virtual
environment, e.g.:
python3 -m venv /path/to/venv
/path/to/venv/pip install <package>
Appending the flag --system-site-packages to the first command will give the
virtual environment access to any Python package installed via XBPS.
Invoking python, pip, and executables installed by pip in /path/to/venv/bin
should automatically use the virtual environment. Alternatively, source its
activation script to add the environment to the command search path for a shell:
. /path/to/venv/activate
After activation, running
deactivate
will remove the environment from the search path without destroying it.
The XBPS package python3-pipx provides pipx, a convenient tool to automatically
manage virtual environments for individual Python applications.

View File

@ -1,28 +1,7 @@
--- setup.py
+++ setup.py
@@ -77,7 +77,7 @@
return sys.platform
-CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ)
+CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ) or ('PYTHONXCPREFIX' in os.environ)
HOST_PLATFORM = get_platform()
MS_WINDOWS = (HOST_PLATFORM == 'win32')
CYGWIN = (HOST_PLATFORM == 'cygwin')
@@ -898,6 +898,10 @@
if HOST_PLATFORM == 'hp-ux11':
self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
+ if 'XBPS_CROSS_BASE' in os.environ:
+ self.lib_dirs += [os.environ['XBPS_CROSS_BASE'] + '/usr/lib']
+ self.inc_dirs += [os.environ['XBPS_CROSS_BASE'] + '/usr/include']
+
if MACOS:
# This should work on any unixy platform ;-)
# If the user has bothered specifying additional -I and -L flags
--- Makefile.pre.in
+++ Makefile.pre.in
@@ -1743,8 +1743,6 @@
diff -ur a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1901,8 +1901,6 @@
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
@ -30,8 +9,8 @@
- $$ensurepip --root=$(DESTDIR)/ ; \
fi
altinstall: commoninstall
@@ -1753,8 +1751,6 @@
.PHONY: altinstall
@@ -1912,8 +1910,6 @@
upgrade) ensurepip="--altinstall --upgrade" ;; \
install|*) ensurepip="--altinstall" ;; \
esac; \
@ -39,20 +18,4 @@
- $$ensurepip --root=$(DESTDIR)/ ; \
fi
commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
@@ -2226,11 +2222,12 @@
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: all
+ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
--prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
- --root=$(DESTDIR)/
+ --install-scripts=$(DESTDIR)$(BINDIR) \
+ --install-platlib=$(DESTDIR)$(DESTSHARED) \
+ --root=/
-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
.PHONY: commoninstall

View File

@ -1,16 +1,22 @@
From 2c26cbb9292c5b06febe9b4a135e140ece4a7e46 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Thu, 17 Dec 2020 01:41:54 +0100
Subject: [PATCH] add powerpcle triple
---
configure | 4 ++++
configure.ac | 4 ++++
2 files changed, 8 insertions(+)
diff -ur a/configure b/configure
--- a/configure
+++ b/configure
@@ -6113,7 +6113,11 @@
@@ -5952,6 +5952,14 @@
printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
+if test x$MULTIARCH = xpowerpc-linux-musl
+then
+ MULTIARCH="powerpc-linux-gnu"
+fi
+if test x$MULTIARCH = xpowerpcle-linux-musl
+then
+ MULTIARCH="powerpcle-linux-gnu"
+fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CC compiler name" >&5
@@ -6859,7 +6867,11 @@
powerpc64-linux-gnu
# endif
# elif defined(__powerpc__)
@ -22,9 +28,10 @@ Subject: [PATCH] add powerpcle triple
# elif defined(__s390x__)
s390x-linux-gnu
# elif defined(__s390__)
diff -ur a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1011,7 +1011,11 @@
@@ -1039,7 +1039,11 @@
powerpc64-linux-gnu
# endif
# elif defined(__powerpc__)

View File

@ -1,17 +0,0 @@
--- a/configure
+++ b/configure
@@ -5221,6 +5221,14 @@
$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
+if test x$MULTIARCH = xpowerpc-linux-musl
+then
+ MULTIARCH="powerpc-linux-gnu"
+fi
+if test x$MULTIARCH = xpowerpcle-linux-musl
+then
+ MULTIARCH="powerpcle-linux-gnu"
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CC compiler name" >&5

View File

@ -3,7 +3,7 @@
# THIS PACKAGE MUST BE SYNCHRONIZED WITH "srcpkgs/python3-tkinter".
#
pkgname=python3
version=3.11.5
version=3.12.0
revision=1
build_style="gnu-configure"
configure_args="--enable-shared --enable-ipv6 --enable-optimizations
@ -22,10 +22,10 @@ license="Python-2.0"
homepage="https://www.python.org"
_bluez="bluez-5.64"
distfiles="
https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz
https://www.python.org/ftp/python/${version%rc*}/Python-${version}.tar.xz
${KERNEL_SITE}/bluetooth/${_bluez}.tar.xz
"
checksum="85cd12e9cf1d6d5a45f17f7afe1cebe7ee628d3282281c492e86adf636defa3f
checksum="795c34f44df45a0e9b9710c8c71c15c671871524cd412ca14def212e8ccb155d
ae437e65b6b3070c198bc5b0109fe9cdeb9eaa387380e2072f9de65fe8a1de34"
skip_extraction="${_bluez}.tar.xz"
@ -38,14 +38,13 @@ alternatives="
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3"
configure_args+=" --with-build-python=python3.11"
configure_args+=" --with-build-python=python${py3_ver}"
configure_args+=" ac_cv_broken_sem_getvalue=no"
fi
post_extract() {
# Ensure that internal copies of expat and libffi are not used
rm -rf Modules/expat
rm -rf Modules/_ctypes/{darwin,libffi}*
# Ensure that the internal copy of expat is not used
rm -r Modules/expat
# Extract Bluetooth headers
local _srcdistdir="${XBPS_SRCDISTDIR}/${sourcepkg}-${version}"
@ -56,8 +55,8 @@ post_extract() {
}
post_patch() {
if [ "$CROSS_BUILD" ]; then
patch -Np0 -i ${FILESDIR}/cross.patch
if [ -n "$CROSS_BUILD" ]; then
patch -Np1 -i ${FILESDIR}/cross.patch
fi
}
@ -136,6 +135,9 @@ do_install() {
${DESTDIR}/usr/bin/python${version%.*}-config \
${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_*_*.py \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}*/Makefile
# https://peps.python.org/pep-0668/
vinstall ${FILESDIR}/EXTERNALLY-MANAGED 644 usr/lib/python${version%.*}
}
python3-devel_package() {