Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] python3, python2: clean up templates andgg dead alternatives, combine python2 and python2-tkinter
@ 2025-01-31 17:04 ahesford
  2025-02-02 23:02 ` [PR REVIEW] " sgn
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ahesford @ 2025-01-31 17:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages theres_a_snake_in_my_boots
https://github.com/void-linux/void-packages/pull/54161

python3, python2: clean up templates andgg dead alternatives, combine python2 and python2-tkinter
The `2to3` script is gone in our `python3`, making the `2to3` alternative obsolete. The `idle` alternative in the main `python3` package is wrong, because it produces a dead symlink when `idle-python3` is not installed.

Rather than split off a new `idle` alternative that behaves properly, it's better to just make a fixed `idle` symlink in the `idle-python3` package, drop `idle` from the `python` alternative in the `python2` package, and move on. This means that py2 users will have to use `idle2` or `idle2.7`, but we shouldn't worry about that anymore. It's a dead package that is already marked for "limited use".

At the same time, we don't have to worry about cycles with `python2`, so we can drop the split package and build the whole thing together.

Eventually, we should drop the alternatives for `python2` entirely, but that's a broader scope that I don't want to think about at the moment.

Closes: #54154.

cc: @leahneukirchen 

A patch file from https://github.com/void-linux/void-packages/pull/54161.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-theres_a_snake_in_my_boots-54161.patch --]
[-- Type: text/x-diff, Size: 16987 bytes --]

From 11cf57050f288ef0ffc66e9e7b192dcfb4bf3dd1 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 31 Jan 2025 11:29:24 -0500
Subject: [PATCH 1/3] python3: clean up alternatives

---
 srcpkgs/python3/template | 54 +++++++++++++++++++++-------------------
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/srcpkgs/python3/template b/srcpkgs/python3/template
index b4f2829f001a9d..4b65c20b7971dc 100644
--- a/srcpkgs/python3/template
+++ b/srcpkgs/python3/template
@@ -6,13 +6,13 @@
 #
 pkgname=python3
 version=3.13.1
-revision=1
+revision=2
 build_style="gnu-configure"
 configure_args="--enable-shared --enable-ipv6
  --enable-loadable-sqlite-extensions --with-computed-gotos
  --with-dbmliborder=gdbm:ndbm --with-system-expat
  --without-ensurepip ac_cv_working_tzset=yes"
-pycompile_dirs="usr/lib/python${version%.*}"
+pycompile_dirs="${py3_lib}"
 hostmakedepends="pkgconf autoconf-archive automake"
 makedepends="libffi-devel readline-devel gdbm-devel openssl-devel
  expat-devel sqlite-devel bzip2-devel zlib-devel liblzma-devel"
@@ -32,8 +32,6 @@ checksum="9cf9427bee9e2242e3877dd0f6b641c1853ca461f39d6503ce260a59c80bf0d9
 skip_extraction="${_bluez}.tar.xz"
 
 alternatives="
- python:idle:/usr/bin/idle${version%.*}
- python:2to3:/usr/bin/2to3-${version%.*}
  python:pydoc:/usr/bin/pydoc${version%.*}
  python:python:/usr/bin/python${version%.*}
  python:python.1:/usr/share/man/man1/python${version%.*}.1"
@@ -126,36 +124,43 @@ do_install() {
 	rm ${DESTDIR}/${py3_lib}/LICENSE.txt
 
 	rm -f ${DESTDIR}/usr/bin/2to3
+
+	local _dst_py3_lib="${DESTDIR}/${py3_lib}"
+
 	# Remove files that belong to python3-tkinter and idle-python3
-	rm -f ${DESTDIR}/usr/bin/idle3*
-	rm -rf ${DESTDIR}/usr/lib/python${version%.*}/idlelib
-	rm -rf ${DESTDIR}/usr/lib/python${version%.*}/tkinter
-	rm -rf ${DESTDIR}/usr/lib/python${version%.*}/turtledemo
-	rm -f ${DESTDIR}/usr/lib/python${version%.*}/turtle.py
+	rm ${DESTDIR}/usr/bin/idle3*
+	rm ${_dst_py3_lib}/turtle.py
+	rm -r ${_dst_py3_lib}/idlelib
+	rm -r ${_dst_py3_lib}/tkinter
+	rm -r ${_dst_py3_lib}/turtledemo
+
 	# Remove test module and tests that fail to be byte-compiled.
-	rm -rf ${DESTDIR}/usr/lib/python${version%.*}/test
-	rm -rf ${DESTDIR}/usr/lib/python${version%.*}/lib2to3/tests
+	rm -rf ${_dst_py3_lib}/test
+	rm -rf ${_dst_py3_lib}/lib2to3/tests
+
 	# Remove references to the install(1) wrapper.
 	sed -e "s,${XBPS_WRAPPERDIR},/usr/bin,g" -i \
-		${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_*_*.py \
-		${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}*/Makefile
+		${_dst_py3_lib}/_sysconfigdata_*_*.py \
+		${_dst_py3_lib}/config-${version%.*}*/Makefile
+
 	if [ "$CROSS_BUILD" ]; then
 		# Remove references to cross toolchain.
 		sed -i "s/$XBPS_CROSS_TRIPLET-//g" \
-			${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_*_*.py \
-			${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}*/Makefile
+			${_dst_py3_lib}/_sysconfigdata_*_*.py \
+			${_dst_py3_lib}/config-${version%.*}*/Makefile
 		sed -i -e "s,$XBPS_CROSS_BASE,,g" \
 			${DESTDIR}/usr/bin/python${version%.*}-config
 	fi
-	sed -i -e "s,-fdebug-prefix-map=[^[:space:]]*=[.],," \
+
+	sed -i -e "s,-I./External,," \
 		-e "s,-ffile-prefix-map=[^[:space:]]*=[.],," \
-		-e "s,-I./External,," \
+		-e "s,-fdebug-prefix-map=[^[:space:]]*=[.],," \
 		${DESTDIR}/usr/bin/python${version%.*}-config \
-		${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_*_*.py \
-		${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}*/Makefile
+		${_dst_py3_lib}/_sysconfigdata_*_*.py \
+		${_dst_py3_lib}/config-${version%.*}*/Makefile
 
 	# https://peps.python.org/pep-0668/
-	vinstall ${FILESDIR}/EXTERNALLY-MANAGED 644 usr/lib/python${version%.*}
+	vinstall ${FILESDIR}/EXTERNALLY-MANAGED 644 "${py3_lib}"
 }
 
 python3-devel_package() {
@@ -165,10 +170,9 @@ python3-devel_package() {
 		vmove usr/bin/python*-config
 		vmove usr/lib/pkgconfig
 		vmove usr/include
-		mv ${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}*/libpython${version%.*}*.a \
-			${PKGDESTDIR}/usr/lib
-		mkdir -p ${DESTDIR}/usr/include/python${version%.*}
-		mv ${PKGDESTDIR}/usr/include/python${version%.*}/pyconfig.h \
-			${DESTDIR}/usr/include/python${version%.*}
+		mv "${DESTDIR}/${py3_lib}"/config-*/libpython*.a "${PKGDESTDIR}/usr/lib"
+
+		mkdir -p "${DESTDIR}/${py3_inc}"
+		mv "${PKGDESTDIR}/${py3_inc}/pyconfig.h" "${DESTDIR}/${py3_inc}"
 	}
 }

From c48d823431b07b1dcd0985cd3df0fdbda749b073 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 31 Jan 2025 11:29:24 -0500
Subject: [PATCH 2/3] python3-tkinter: clean up alternatives

---
 srcpkgs/python3-tkinter/template | 36 ++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/python3-tkinter/template b/srcpkgs/python3-tkinter/template
index 73cc637cd89a8b..b501f23cb0366a 100644
--- a/srcpkgs/python3-tkinter/template
+++ b/srcpkgs/python3-tkinter/template
@@ -9,16 +9,13 @@ _desc="Python programming language"
 
 pkgname=python3-tkinter
 version=3.13.1
-revision=1
+revision=2
 build_style="gnu-configure"
 configure_args="--enable-shared --enable-ipv6
  --enable-loadable-sqlite-extensions --with-computed-gotos
  --with-dbmliborder=gdbm:ndbm --with-system-expat --with-system-ffi
  --without-ensurepip"
-pycompile_dirs="
- usr/lib/python${version%.*}/tkinter
- usr/lib/python${version%.*}/turtledemo
- usr/lib/python${version%.*}/turtle.py"
+pycompile_dirs="${py3_lib}/tkinter ${py3_lib}/turtledemo ${py3_lib}/turtle.py"
 hostmakedepends="pkg-config"
 makedepends="libffi-devel readline-devel gdbm-devel openssl-devel
  expat-devel sqlite-devel bzip2-devel zlib-devel liblzma-devel tk-devel"
@@ -63,6 +60,7 @@ do_check() {
 }
 
 do_install() {
+
 	mkdir -p ${wrksrc}/tmp-destdir/usr/lib
 	ln -s lib ${wrksrc}/tmp-destdir/usr/lib${XBPS_TARGET_WORDSIZE}
 
@@ -71,25 +69,31 @@ do_install() {
 
 	# We only care for the idle and tkinter modules.
 	vmkdir usr/bin
-	vmkdir usr/lib/python${version%.*}/lib-dynload
-	mv ${wrksrc}/tmp-destdir/usr/bin/idle${version%.*} \
-		${DESTDIR}/usr/bin/idle${version%.*}
+	vmkdir "${py3_lib}/lib-dynload"
+
+	local _idle="idle${version%.*}"
+	local _src_py_lib="${wrksrc}/tmp-destdir/${py3_lib}"
+	local _dst_py_lib="${DESTDIR}/${py3_lib}"
+
+	mv "${wrksrc}/tmp-destdir/usr/bin/${_idle}" "${DESTDIR}/usr/bin"
+	mv "${_src_py_lib}/lib-dynload"/_tkinter.*.so "${_dst_py_lib}/lib-dynload"
+
 	for lib in idlelib tkinter turtledemo turtle.py; do
-		mv ${wrksrc}/tmp-destdir/usr/lib/python${version%.*}/${lib} \
-			${DESTDIR}/usr/lib/python${version%.*}/
+		mv "${_src_py_lib}/${lib}" "${DESTDIR}/${py3_lib}"
 	done
-	mv ${wrksrc}/tmp-destdir/usr/lib/python${version%.*}/lib-dynload/_tkinter.cpython-*.so \
-		${DESTDIR}/usr/lib/python${version%.*}/lib-dynload/
-	ln -sf idle${version%.*} ${DESTDIR}/usr/bin/idle3
+
+	ln -sf "${_idle}" ${DESTDIR}/usr/bin/idle3
+	ln -sf "${_idle}" ${DESTDIR}/usr/bin/idle
 }
 
 idle-python3_package() {
 	short_desc="${_desc} - IDE for Python3 using Tkinter"
-	pycompile_dirs="usr/lib/python${version%.*}/idlelib"
+	pycompile_dirs="${py3_lib}/idlelib"
 	depends="${sourcepkg}-${version}_${revision}"
+	conflicts="python<3.0.0_1 python2<=2.7.18.11_1 python3<=3.13.1_1"
 	pkg_install() {
-		vmove usr/bin/idle3*
-		vmove usr/lib/python${version%.*}/idlelib
+		vmove usr/bin/idle*
+		vmove "${py3_lib}/idlelib"
 		vinstall ${FILESDIR}/idle3.xpm 644 usr/share/pixmaps
 		vinstall ${FILESDIR}/idle3.desktop 644 usr/share/applications
 	}

From f82d9008e8dc32fa66ebcdcc7a3d971615a9b0ea Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 31 Jan 2025 11:31:34 -0500
Subject: [PATCH 3/3] python2: clean up alternatives, merge python2-tkinter

---
 srcpkgs/idle-python2                          |  2 +-
 srcpkgs/python2-tkinter                       |  1 +
 srcpkgs/python2-tkinter/files/cross.patch     |  1 -
 srcpkgs/python2-tkinter/template              | 90 -------------------
 srcpkgs/python2-tkinter/update                |  1 -
 .../files/idle2.desktop                       |  0
 .../files/idle2.xpm                           |  0
 srcpkgs/python2/template                      | 67 +++++++++-----
 8 files changed, 46 insertions(+), 116 deletions(-)
 create mode 120000 srcpkgs/python2-tkinter
 delete mode 120000 srcpkgs/python2-tkinter/files/cross.patch
 delete mode 100644 srcpkgs/python2-tkinter/template
 delete mode 120000 srcpkgs/python2-tkinter/update
 rename srcpkgs/{python2-tkinter => python2}/files/idle2.desktop (100%)
 rename srcpkgs/{python2-tkinter => python2}/files/idle2.xpm (100%)

diff --git a/srcpkgs/idle-python2 b/srcpkgs/idle-python2
index 5e2384079e0e4d..551ab268585033 120000
--- a/srcpkgs/idle-python2
+++ b/srcpkgs/idle-python2
@@ -1 +1 @@
-python2-tkinter
\ No newline at end of file
+python2
\ No newline at end of file
diff --git a/srcpkgs/python2-tkinter b/srcpkgs/python2-tkinter
new file mode 120000
index 00000000000000..551ab268585033
--- /dev/null
+++ b/srcpkgs/python2-tkinter
@@ -0,0 +1 @@
+python2
\ No newline at end of file
diff --git a/srcpkgs/python2-tkinter/files/cross.patch b/srcpkgs/python2-tkinter/files/cross.patch
deleted file mode 120000
index 352ebe295b5b38..00000000000000
--- a/srcpkgs/python2-tkinter/files/cross.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../python2/files/cross.patch
\ No newline at end of file
diff --git a/srcpkgs/python2-tkinter/template b/srcpkgs/python2-tkinter/template
deleted file mode 100644
index ffe32444395cc9..00000000000000
--- a/srcpkgs/python2-tkinter/template
+++ /dev/null
@@ -1,90 +0,0 @@
-# Template file for 'python2-tkinter'
-#
-# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/python2"; IT IS SPLITTED TO AVOID
-# A CYCLIC DEPENDENCY: python2 -> tk -> libX11 -> libxcb -> xcb-proto -> python2
-#
-
-_desc="Interpreted, interactive, object-oriented programming language"
-
-pkgname=python2-tkinter
-version=2.7.18.11
-revision=1
-_commit=a22a1d856ea8c656debe6f9a8fe9fee1ffc3f144
-pycompile_dirs="usr/lib/python2.7/lib-tk"
-hostmakedepends="pkg-config"
-makedepends="libffi-devel readline-devel gdbm-devel openssl-devel expat-devel
- sqlite-devel bzip2-devel zlib-devel tk-devel"
-short_desc="${_desc} - GUI toolkit for Python2"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="Python-2.0"
-homepage="https://www.python.org"
-distfiles="https://github.com/ActiveState/cpython/archive/${_commit}.tar.gz"
-checksum=aeb7b021405093b8687239009e5dadb2cb4099e69e75a246d6279770a5fee3af
-
-if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
-	makedepends+=" libxcrypt-devel"
-fi
-
-pre_configure() {
-	# Ensure that internal copies of expat and libffi are not used.
-	rm -r Modules/expat
-	rm -r Modules/_ctypes/libffi*
-	# Enable loading sqlite extensions.
-	vsed -i '/SQLITE_OMIT_LOAD_EXTENSION/d' setup.py
-}
-
-do_configure() {
-	unset GCC CC CXX CPP LD AR AS RANLIB
-	if [ "$CROSS_BUILD" ]; then
-		mkdir -p host-build
-		cd host-build
-		env -i PATH=$PATH XBPS_ARCH=$XBPS_ARCH ../configure
-		env -i PATH=$PATH XBPS_ARCH=$XBPS_ARCH make ${makejobs} python
-		mkdir -p ../hostpython
-		mv python ../hostpython
-		cd ..
-		patch -Np0 -i ${FILESDIR}/cross.patch
-	fi
-	./configure ${configure_args} \
-		--enable-shared --enable-ipv6 --with-threads --enable-unicode=ucs4 \
-		--with-computed-gotos --with-wctype-functions --with-dbmliborder=gdbm:ndbm \
-		--with-system-expat --with-system-ffi --without-ensurepip
-}
-
-do_build() {
-	export PATH="$PATH:$wrksrc/hostpython"
-	make ${makejobs}
-}
-
-do_install() {
-	export PATH="$PATH:$wrksrc/hostpython"
-
-	mkdir -p ${wrksrc}/tmp-destdir/usr/lib
-	ln -s lib ${wrksrc}/tmp-destdir/usr/lib${XBPS_TARGET_WORDSIZE}
-
-	make DESTDIR=${wrksrc}/tmp-destdir altinstall
-
-	# We only care for the idle and tk modules.
-	vmkdir usr/bin
-	vmkdir usr/lib/python2.7/lib-dynload
-	mv ${wrksrc}/tmp-destdir/usr/bin/idle ${DESTDIR}/usr/bin/idle2.7
-	mv ${wrksrc}/tmp-destdir/usr/lib/python2.7/idlelib \
-		${DESTDIR}/usr/lib/python2.7/
-	mv ${wrksrc}/tmp-destdir/usr/lib/python2.7/lib-tk \
-		${DESTDIR}/usr/lib/python2.7/
-	mv ${wrksrc}/tmp-destdir/usr/lib/python2.7/lib-dynload/_tkinter.so \
-		${DESTDIR}/usr/lib/python2.7/lib-dynload/
-	ln -sf idle2.7 ${DESTDIR}/usr/bin/idle2
-}
-
-idle-python2_package() {
-	short_desc="${_desc} - IDE for Python2 using Tkinter"
-	pycompile_dirs="usr/lib/python2.7/idlelib"
-	depends="${sourcepkg}-${version}_${revision}"
-	pkg_install() {
-		vmove usr/bin/idle2*
-		vmove usr/lib/python2.7/idlelib
-		vinstall ${FILESDIR}/idle2.xpm 644 usr/share/pixmaps
-		vinstall ${FILESDIR}/idle2.desktop 644 usr/share/applications
-	}
-}
diff --git a/srcpkgs/python2-tkinter/update b/srcpkgs/python2-tkinter/update
deleted file mode 120000
index b29540d8f73a12..00000000000000
--- a/srcpkgs/python2-tkinter/update
+++ /dev/null
@@ -1 +0,0 @@
-../python2/update
\ No newline at end of file
diff --git a/srcpkgs/python2-tkinter/files/idle2.desktop b/srcpkgs/python2/files/idle2.desktop
similarity index 100%
rename from srcpkgs/python2-tkinter/files/idle2.desktop
rename to srcpkgs/python2/files/idle2.desktop
diff --git a/srcpkgs/python2-tkinter/files/idle2.xpm b/srcpkgs/python2/files/idle2.xpm
similarity index 100%
rename from srcpkgs/python2-tkinter/files/idle2.xpm
rename to srcpkgs/python2/files/idle2.xpm
diff --git a/srcpkgs/python2/template b/srcpkgs/python2/template
index bc3162371e7209..e9a93d6a32f865 100644
--- a/srcpkgs/python2/template
+++ b/srcpkgs/python2/template
@@ -1,15 +1,12 @@
 # Template file for 'python2'
-#
-# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/python2-tkinter".
-#
 pkgname=python2
 version=2.7.18.11
-revision=1
+revision=2
 _commit=a22a1d856ea8c656debe6f9a8fe9fee1ffc3f144
 pycompile_dirs="usr/lib/python2.7"
 hostmakedepends="pkg-config"
 makedepends="libffi-devel readline-devel gdbm-devel openssl-devel expat-devel
- sqlite-devel bzip2-devel zlib-devel"
+ sqlite-devel bzip2-devel zlib-devel tk-devel"
 depends="ca-certificates"
 short_desc="Interpreted, interactive, object-oriented programming language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -21,7 +18,6 @@ checksum=aeb7b021405093b8687239009e5dadb2cb4099e69e75a246d6279770a5fee3af
 short_desc+=" (limited install; not for regular use)"
 
 alternatives="
- python:idle:/usr/bin/idle2.7
  python:2to3:/usr/bin/2to3-2.7
  python:pydoc:/usr/bin/pydoc2.7
  python:python:/usr/bin/python2.7
@@ -79,25 +75,28 @@ do_install() {
 post_install() {
 	chmod 755 ${DESTDIR}/usr/lib/libpython*.so*
 	vlicense LICENSE
-	rm -f ${DESTDIR}/usr/bin/smtpd.py
-	mv ${DESTDIR}/usr/bin/2to3{,-2.7}
-	mv ${DESTDIR}/usr/bin/pydoc{,2.7}
-	# Remove files that belong to python-tkinter and idle-python
-	rm ${DESTDIR}/usr/bin/idle
-	rm -r ${DESTDIR}/usr/lib/python2.7/idlelib
-	rm -r ${DESTDIR}/usr/lib/python2.7/lib-tk
+
+	rm ${DESTDIR}/usr/bin/smtpd.py
+
+	mv ${DESTDIR}/usr/bin/2to3{,-${py2_ver}}
+	mv ${DESTDIR}/usr/bin/pydoc{,${py2_ver}}
+	mv ${DESTDIR}/usr/bin/idle{,${py2_ver}}
+	ln -sf "idle${py2_ver}" "${DESTDIR}/usr/bin/idle2"
+
 	# Remove test module and tests that fail to be byte-compiled.
-	rm -r ${DESTDIR}/usr/lib/python2.7/test
-	rm -r ${DESTDIR}/usr/lib/python2.7/lib2to3/tests
+	rm -r ${DESTDIR}/${py2_lib}/test
+	rm -r ${DESTDIR}/${py2_lib}/lib2to3/tests
+
 	# Remove references to the install(1) wrapper.
 	vsed -e "s,${XBPS_WRAPPERDIR},/usr/bin,g" -i \
-		${DESTDIR}/usr/lib/python${version%.*.*}/_sysconfigdata.py \
-		${DESTDIR}/usr/lib/python${version%.*.*}/config/Makefile
+		${DESTDIR}/${py2_lib}/_sysconfigdata.py \
+		${DESTDIR}/${py2_lib}/config/Makefile
+
 	if [ "$CROSS_BUILD" ]; then
 		# Remove references to cross toolchain.
 		vsed -i "s/$XBPS_CROSS_TRIPLET-//g" \
-			${DESTDIR}/usr/lib/python${version%.*.*}/_sysconfigdata.py \
-			${DESTDIR}/usr/lib/python${version%.*.*}/config/Makefile
+			${DESTDIR}/${py2_lib}/_sysconfigdata.py \
+			${DESTDIR}/${py2_lib}/config/Makefile
 	fi
 }
 
@@ -108,9 +107,31 @@ python2-devel_package() {
 		vmove usr/bin/python*-config
 		vmove usr/lib/pkgconfig
 		vmove usr/include
-		vmove usr/lib/python2.7/config/libpython2.7.a
-		mkdir -p ${DESTDIR}/usr/include/python2.7
-		mv ${PKGDESTDIR}/usr/include/python2.7/pyconfig.h \
-			${DESTDIR}/usr/include/python2.7
+		vmove "${py2_lib}/config/libpython2.7.a"
+
+		# Restore pyconfig.h to main package
+		mkdir -p "${DESTDIR}/${py2_inc}"
+		mv "${PKGDESTDIR}/${py2_inc}/pyconfig.h" "${DESTDIR}/${py2_inc}"
+	}
+}
+
+python2-tkinter_package() {
+	short_desc+=" - GUI toolkit for Python2"
+	depens="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove "${py2_lib}/lib-tk"
+		vmove "${py2_lib}/lib-dynload/_tkinter.so"
+	}
+}
+
+idle-python2_package() {
+	short_desc="${_desc} - IDE for Python2 using Tkinter"
+	pycompile_dirs="usr/lib/python2.7/idlelib"
+	depends="${sourcepkg}-${version}_${revision}"
+	pkg_install() {
+		vmove usr/bin/idle*
+		vmove usr/lib/python2.7/idlelib
+		vinstall ${FILESDIR}/idle2.xpm 644 usr/share/pixmaps
+		vinstall ${FILESDIR}/idle2.desktop 644 usr/share/applications
 	}
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-09  3:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-31 17:04 [PR PATCH] python3, python2: clean up templates andgg dead alternatives, combine python2 and python2-tkinter ahesford
2025-02-02 23:02 ` [PR REVIEW] " sgn
2025-02-02 23:02 ` sgn
2025-02-03 12:47 ` ahesford
2025-02-09  1:36 ` [PR PATCH] [Updated] python3, python2: clean up templates and " ahesford
2025-02-09  3:58 ` [PR PATCH] [Closed]: " ahesford
2025-02-09  3:58 ` ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).