------ Original Message ------ From: [email protected] To: [email protected] Cc: [email protected]; [email protected] Sent: Tuesday, June 7, 2022 10:50 AM Subject: Re: Python Tkinter 8.6
Thanks for taking a look, I have a new patch!
On 2022/06/07 09:05, Stuart Cassoff wrote:
> Does it make sense to put all the TkInter bits inside .if
> ${BUILD_PACKAGES:M-tkinter} ?
do you mean LIB_DEPENDS-tkinter, WANTLIB-tkinter, etc? if so, no,
these
should be set unconditionally I simplified this bit, no worries. Nicer, even. > Are the changes to CHANGES.OpenBSD ok/necessary?changes patching the build files should be added, if it's just CONFIGURE_ARGS etc then I think not. I don't see a patch to match what you added to this?
I wasn't sure and erred on the side of caution. > I also noticed that Python 3.10 doesn't uninstall cleanly. any more info on that? # pkg_add python-3.10.4.p1 ; pkg_delete python-3.10.4.p1 ... Error deleting directory /usr/local/lib/python3.10: Directory not empty > @so lib/python2.7/lib-dynload/datetime.so > @so lib/python2.7/lib-dynload/dbm.so > +@so lib/python2.7/lib-dynload/dl.so > @so lib/python2.7/lib-dynload/fcntl.so > @so lib/python2.7/lib-dynload/future_builtins.so > @so lib/python2.7/lib-dynload/grp.so > +@so lib/python2.7/lib-dynload/imageop.so > @so lib/python2.7/lib-dynload/itertools.so > @so lib/python2.7/lib-dynload/math.so > @so lib/python2.7/lib-dynload/mmap.so you added those to PLIST-main, shouldn't they be in PLIST-tkinter? Not me, the port did - I swear! $ cd /usr/ports/lang/python/2.7; make fake; make update-plist Should yield the same result for porters who are not me. Those .so's aren't part of TkInter. Stu (patch also attached) diff -u -rNp /usr/ports/lang/python/2.7/Makefile ./2.7/Makefile --- /usr/ports/lang/python/2.7/Makefile Mon Mar 28 11:48:24 2022 +++ ./2.7/Makefile Sat Jun 4 16:21:38 2022 @@ -8,12 +8,12 @@ SHARED_LIBS = python2.7 0.0 VERSION_SPEC = >=2.7,<2.8 PORTROACH = limit:^2\.7 -REVISION-main = 7 +REVISION-main = 8 REVISION-idle = 1 REVISION-tests = 1 REVISION-bsddb = 0 REVISION-gdbm = 0 -REVISION-tkinter = 0 +REVISION-tkinter = 1 REVISION-tools = 0 CONFIGURE_ARGS += --with-ensurepip=nodiff -u -rNp /usr/ports/lang/python/2.7/patches/patch-setup_py ./2.7/patches/patch-setup_py --- /usr/ports/lang/python/2.7/patches/patch-setup_py Fri Mar 11 14:29:11 2022
+++ ./2.7/patches/patch-setup_py Sat Jun 4 13:54:33 2022
@@ -84,17 +84,7 @@ Index: setup.py
frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
# All existing framework builds of Tcl/Tk don't support
64-bit
-@@ -1936,8 +1946,7 @@ class PyBuildExt(build_ext):- # The versions with dots are used on Unix, and the versions without
- # dots on Windows, for detection by cygwin. - tcllib = tklib = tcl_includes = tk_includes = None-- for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
-- '8.2', '82', '8.1', '81', '8.0', '80']: -+ for version in ['85']: - tklib = self.compiler.find_library_file(lib_dirs,- 'tk' + version)
- tcllib = self.compiler.find_library_file(lib_dirs,
-@@ -1980,17 +1989,9 @@ class PyBuildExt(build_ext):
+@@ -1980,17 +1990,9 @@ class PyBuildExt(build_ext):
if host_platform == 'sunos5':
include_dirs.append('/usr/openwin/include')
added_lib_dirs.append('/usr/openwin/lib')
diff -u -rNp /usr/ports/lang/python/2.7/pkg/DESCR-tkinter
./2.7/pkg/DESCR-tkinter
--- /usr/ports/lang/python/2.7/pkg/DESCR-tkinter Sun Apr 24 05:31:46
2011
+++ ./2.7/pkg/DESCR-tkinter Wed Jun 8 09:22:52 2022 @@ -11,5 +11,5 @@ in C or C++. On most systems such modules may be dyna Python is also adaptable as an extension language for existing applications. See the internal documentation for hints. -This package contains the Tkinter module, for using the tk toolkit -in Python. +This package contains the Tkinter module, a Python interface to the +Tk graphical toolkit.diff -u -rNp /usr/ports/lang/python/2.7/pkg/PLIST-main ./2.7/pkg/PLIST-main
--- /usr/ports/lang/python/2.7/pkg/PLIST-main Fri Mar 11 14:29:11 2022 +++ ./2.7/pkg/PLIST-main Sat Jun 4 14:05:24 2022@@ -1593,9 +1593,11 @@ lib/python2.7/lib-dynload/Python-${FULL_VERSION}-py2.7
@so lib/python2.7/lib-dynload/crypt.so @so lib/python2.7/lib-dynload/datetime.so @so lib/python2.7/lib-dynload/dbm.so +@so lib/python2.7/lib-dynload/dl.so @so lib/python2.7/lib-dynload/fcntl.so @so lib/python2.7/lib-dynload/future_builtins.so @so lib/python2.7/lib-dynload/grp.so +@so lib/python2.7/lib-dynload/imageop.so @so lib/python2.7/lib-dynload/itertools.so @so lib/python2.7/lib-dynload/math.so @so lib/python2.7/lib-dynload/mmap.so diff -u -rNp /usr/ports/lang/python/3.10/Makefile ./3.10/Makefile --- /usr/ports/lang/python/3.10/Makefile Thu Apr 28 23:34:57 2022 +++ ./3.10/Makefile Sat Jun 4 18:44:57 2022 @@ -8,6 +8,6 @@ SHARED_LIBS = python3.10 0.0 VERSION_SPEC = >=3.10,<3.11 PORTROACH = limit:^3\.10 -REVISION = 1 +REVISION = 2 .include <bsd.port.mk>diff -u -rNp /usr/ports/lang/python/3.10/files/CHANGES.OpenBSD ./3.10/files/CHANGES.OpenBSD --- /usr/ports/lang/python/3.10/files/CHANGES.OpenBSD Thu Apr 28 10:47:56 2022
+++ ./3.10/files/CHANGES.OpenBSD Tue Jun 7 14:37:30 2022 @@ -24,4 +24,4 @@ OpenBSD's version of llvm-ar is installed as /usr/bin/ compiler as passed to ports builds is /usr/bin/cc. These changes are available in the OpenBSD CVS repository -<http://www.openbsd.org/anoncvs.html> in ports/lang/python/3.9. +<http://www.openbsd.org/anoncvs.html> in ports/lang/python/3.10.diff -u -rNp /usr/ports/lang/python/3.10/patches/patch-setup_py ./3.10/patches/patch-setup_py --- /usr/ports/lang/python/3.10/patches/patch-setup_py Sun Apr 3 17:33:23 2022
+++ ./3.10/patches/patch-setup_py Sat Jun 4 08:35:48 2022
@@ -19,13 +19,3 @@ Index: setup.py
uuid_libs = ["uuid"]
else:
uuid_libs = []
-@@ -2116,8 +2118,7 @@ class PyBuildExt(build_ext):
- # The versions with dots are used on Unix, and the versions
without
- # dots on Windows, for detection by cygwin. - tcllib = tklib = tcl_includes = tk_includes = None-- for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
-- '8.2', '82', '8.1', '81', '8.0', '80']: -+ for version in ['85']: - tklib = self.compiler.find_library_file(self.lib_dirs,- 'tk' + version)
- tcllib = self.compiler.find_library_file(self.lib_dirs,diff -u -rNp /usr/ports/lang/python/3.10/pkg/DESCR-tkinter ./3.10/pkg/DESCR-tkinter --- /usr/ports/lang/python/3.10/pkg/DESCR-tkinter Mon Nov 1 10:16:09 2021
+++ ./3.10/pkg/DESCR-tkinter Wed Jun 8 09:22:06 2022 @@ -11,5 +11,5 @@ in C or C++. On most systems such modules may be dyna Python is also adaptable as an extension language for existing applications. See the internal documentation for hints. -This package contains the Tkinter module, for using the tk toolkit -in Python. +This package contains the Tkinter module, a Python interface to the +Tk graphical toolkit. diff -u -rNp /usr/ports/lang/python/3.8/Makefile ./3.8/Makefile --- /usr/ports/lang/python/3.8/Makefile Thu Apr 28 10:47:56 2022 +++ ./3.8/Makefile Sat Jun 4 19:56:41 2022 @@ -8,6 +8,6 @@ SHARED_LIBS = python3.8 0.0 VERSION_SPEC = >=3.8,<3.9 PORTROACH = limit:^3\.8 -REVISION = 1 +REVISION = 2 .include <bsd.port.mk>diff -u -rNp /usr/ports/lang/python/3.8/patches/patch-setup_py ./3.8/patches/patch-setup_py --- /usr/ports/lang/python/3.8/patches/patch-setup_py Sun Apr 3 17:30:12 2022
+++ ./3.8/patches/patch-setup_py Sat Jun 4 08:36:24 2022
@@ -19,13 +19,3 @@ Index: setup.py
uuid_libs = ['uuid']
else:
uuid_libs = []
-@@ -1847,8 +1849,7 @@ class PyBuildExt(build_ext):
- # The versions with dots are used on Unix, and the versions
without
- # dots on Windows, for detection by cygwin. - tcllib = tklib = tcl_includes = tk_includes = None-- for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
-- '8.2', '82', '8.1', '81', '8.0', '80']: -+ for version in ['85']: - tklib = self.compiler.find_library_file(self.lib_dirs,- 'tk' + version)
- tcllib = self.compiler.find_library_file(self.lib_dirs,diff -u -rNp /usr/ports/lang/python/3.8/pkg/DESCR-tkinter ./3.8/pkg/DESCR-tkinter --- /usr/ports/lang/python/3.8/pkg/DESCR-tkinter Thu Nov 7 11:14:09 2019
+++ ./3.8/pkg/DESCR-tkinter Wed Jun 8 09:22:33 2022 @@ -11,5 +11,5 @@ in C or C++. On most systems such modules may be dyna Python is also adaptable as an extension language for existing applications. See the internal documentation for hints. -This package contains the Tkinter module, for using the tk toolkit -in Python. +This package contains the Tkinter module, a Python interface to the +Tk graphical toolkit. diff -u -rNp /usr/ports/lang/python/3.9/Makefile ./3.9/Makefile --- /usr/ports/lang/python/3.9/Makefile Thu May 26 20:11:38 2022 +++ ./3.9/Makefile Sat Jun 4 19:29:53 2022 @@ -8,6 +8,8 @@ SHARED_LIBS = python3.9 0.0 VERSION_SPEC = >=3.9,<3.10 PORTROACH = limit:^3\.9 +REVISION = 0 + # This is the MODPY_DEFAULT_VERSION_3 version of Python: # - override "@comment" setting so that bin/python3 etc are installed PY_DEFAULTONLY =diff -u -rNp /usr/ports/lang/python/3.9/patches/patch-setup_py ./3.9/patches/patch-setup_py --- /usr/ports/lang/python/3.9/patches/patch-setup_py Sun Apr 3 17:32:06 2022
+++ ./3.9/patches/patch-setup_py Sat Jun 4 06:00:48 2022
@@ -19,13 +19,3 @@ Index: setup.py
uuid_libs = ["uuid"]
else:
uuid_libs = []
-@@ -1997,8 +1999,7 @@ class PyBuildExt(build_ext):
- # The versions with dots are used on Unix, and the versions
without
- # dots on Windows, for detection by cygwin. - tcllib = tklib = tcl_includes = tk_includes = None-- for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
-- '8.2', '82', '8.1', '81', '8.0', '80']: -+ for version in ['85']: - tklib = self.compiler.find_library_file(self.lib_dirs,- 'tk' + version)
- tcllib = self.compiler.find_library_file(self.lib_dirs,diff -u -rNp /usr/ports/lang/python/3.9/pkg/DESCR-tkinter ./3.9/pkg/DESCR-tkinter --- /usr/ports/lang/python/3.9/pkg/DESCR-tkinter Mon Oct 5 16:48:12 2020
+++ ./3.9/pkg/DESCR-tkinter Wed Jun 8 09:22:12 2022
@@ -11,5 +11,5 @@ in C or C++. On most systems such modules may be dyna
Python is also adaptable as an extension language for existing
applications. See the internal documentation for hints.
-This package contains the Tkinter module, for using the tk toolkit
-in Python.
+This package contains the Tkinter module, a Python interface to the
+Tk graphical toolkit.
diff -u -rNp /usr/ports/lang/python/Makefile.inc ./Makefile.inc
--- /usr/ports/lang/python/Makefile.inc Thu May 26 20:11:38 2022
+++ ./Makefile.inc Tue Jun 7 14:34:39 2022
@@ -8,7 +8,7 @@ COMMENT-bsddb = Berkeley db module for Python
COMMENT-gdbm = GNU dbm module for Python
COMMENT-idle = IDE for Python
COMMENT-tests = Python test suite
-COMMENT-tkinter = tk GUI module for Python
+COMMENT-tkinter = Python interface to the Tk graphical toolkit
COMMENT-tools = extra tools for Python
VERSION = ${FULL_VERSION:R}
@@ -95,11 +95,16 @@ RUN_DEPENDS-idle = lang/python/${VERSION},-tkinter \
WANTLIB-idle =
MODULES += x11/tk
-# Tcl/Tk version needs to be in sync with patch-setup_py's one
+
+.if ${VERSION} == "2.7"
MODTK_VERSION = 8.5
+.else
+MODTK_VERSION = 8.6
+.endif
+
LIB_DEPENDS-tkinter = lang/python/${VERSION},-main \
${MODTK_LIB_DEPENDS}
-WANTLIB-tkinter = X11 pthread python${VERSION} \
+WANTLIB-tkinter = pthread python${VERSION} \
${MODTK_WANTLIB}
AUTOCONF_VERSION = 2.69
@@ -117,6 +122,13 @@ CONFIGURE_ARGS +=
--enable-loadable-sqlite-extensions
CONFIGURE_ARGS += --with-lto
. endif
TEST_IS_INTERACTIVE = Yes
+.endif
+
+.include <bsd.port.arch.mk>
+
+.if ${BUILD_PACKAGES:M-tkinter}
+CONFIGURE_ARGS += --with-tcltk-includes='-I${MODTCL_INCDIR}
-I${MODTK_INCDIR} -I${X11BASE}/include' \
+ --with-tcltk-libs='-L${X11BASE}/lib -l${MODTCL_LIB}
-l${MODTK_LIB}'
.endif
CONFIGURE_ENV += OPT='${CFLAGS} -fPIC'
CPPFLAGS='-I${LOCALBASE}/include' \
pytk.diff.gz
Description: application/gzip
