Skip to content

Commit

Permalink
python3, python3-tkinter: update to 3.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ahesford committed Sep 24, 2023
1 parent 5e524f0 commit 7320569
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 92 deletions.
2 changes: 1 addition & 1 deletion common/environment/setup/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion common/hooks/pre-configure/02-script-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
15 changes: 7 additions & 8 deletions srcpkgs/python3-tkinter/template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
_desc="Python programming language"

pkgname=python3-tkinter
version=3.11.5
version=3.12.0rc3
revision=1
build_style="gnu-configure"
configure_args="--enable-shared --enable-ipv6 --enable-optimizations
Expand All @@ -27,23 +27,22 @@ short_desc="${_desc} - GUI toolkit for Python3"
maintainer="Andrew J. Hesford <[email protected]>"
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=96397e891e98802b1d399dee3ceaeb9bcf0aa2566c8a7b1cce4d0196c277506a

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
}

Expand Down
51 changes: 7 additions & 44 deletions srcpkgs/python3/files/cross.patch
Original file line number Diff line number Diff line change
@@ -1,58 +1,21 @@
--- 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; \
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
- $$ensurepip --root=$(DESTDIR)/ ; \
fi

altinstall: commoninstall
@@ -1753,8 +1751,6 @@
.PHONY: altinstall
@@ -1912,8 +1910,6 @@
upgrade) ensurepip="--altinstall --upgrade" ;; \
install|*) ensurepip="--altinstall" ;; \
esac; \
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
- $$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
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
From 2c26cbb9292c5b06febe9b4a135e140ece4a7e46 Mon Sep 17 00:00:00 2001
From: q66 <[email protected]>
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__)
Expand All @@ -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__)
Expand Down

This file was deleted.

17 changes: 8 additions & 9 deletions srcpkgs/python3/template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# THIS PACKAGE MUST BE SYNCHRONIZED WITH "srcpkgs/python3-tkinter".
#
pkgname=python3
version=3.11.5
version=3.12.0rc3
revision=1
build_style="gnu-configure"
configure_args="--enable-shared --enable-ipv6 --enable-optimizations
Expand All @@ -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="96397e891e98802b1d399dee3ceaeb9bcf0aa2566c8a7b1cce4d0196c277506a
ae437e65b6b3070c198bc5b0109fe9cdeb9eaa387380e2072f9de65fe8a1de34"
skip_extraction="${_bluez}.tar.xz"

Expand All @@ -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}"
Expand All @@ -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
}

Expand Down

0 comments on commit 7320569

Please sign in to comment.