On Fri, Sep 22, 2023 at 05:12:59PM -0400, Daniel Dickman wrote: > We discussed this back in Jan and then nothing happened. > > ok on the diff below to switch from python2 to python3?
I think the -python package should rename from py- to py3-, below is your diff that, its quirk, with whitspace cleanup and more PLIST changes after update-plist. This upgrades fine for me with # TRUSTED_PKG_PATH=.../ pkg_add -u py-snack-2.2.10p2->py3-snack-2.2.10p3: ok Read shared items: ok OK kn > > This is one of the last 2 consumers of python2,-tkinter (the other > consumer being security/oletools for which I've sent a python3 diff to > rpointel@). Index: devel/quirks/Makefile =================================================================== RCS file: /cvs/ports/devel/quirks/Makefile,v retrieving revision 1.1541 diff -u -p -r1.1541 Makefile --- devel/quirks/Makefile 22 Sep 2023 20:37:12 -0000 1.1541 +++ devel/quirks/Makefile 24 Sep 2023 09:00:20 -0000 @@ -3,7 +3,7 @@ CATEGORIES = devel databases DISTFILES = # API.rev -PKGNAME = quirks-6.157 +PKGNAME = quirks-6.158 PKG_ARCH = * MAINTAINER = Marc Espie <es...@openbsd.org> Index: devel/quirks/files/Quirks.pm =================================================================== RCS file: /cvs/ports/devel/quirks/files/Quirks.pm,v retrieving revision 1.1553 diff -u -p -r1.1553 Quirks.pm --- devel/quirks/files/Quirks.pm 22 Sep 2023 20:37:12 -0000 1.1553 +++ devel/quirks/files/Quirks.pm 24 Sep 2023 09:00:52 -0000 @@ -785,6 +785,7 @@ my $stem_extensions = { 'py-altgraph' => 'py3-altgraph', 'pymodbus' => 'py3-pymodbus', 'py-yaml' => 'py3-yaml', + 'py-snack' => 'py3-snack', }; my $obsolete_reason = {}; Index: audio/snack/Makefile =================================================================== RCS file: /cvs/ports/audio/snack/Makefile,v retrieving revision 1.18 diff -u -p -r1.18 Makefile --- audio/snack/Makefile 5 Sep 2023 16:13:42 -0000 1.18 +++ audio/snack/Makefile 24 Sep 2023 09:07:53 -0000 @@ -4,11 +4,11 @@ COMMENT-python = Python bindings for Tcl MODPY_EGG_VERSION = 2.2.10 DISTNAME = snack${MODPY_EGG_VERSION} PKGNAME-main = snack-${MODPY_EGG_VERSION} -PKGNAME-python = py-snack-${MODPY_EGG_VERSION} +PKGNAME-python = ${MODPY_PY_PREFIX}snack-${MODPY_EGG_VERSION} CATEGORIES = audio -REVISION-main = 6 -REVISION-python =2 +REVISION-main = 7 +REVISION-python = 3 HOMEPAGE = http://www.speech.kth.se/snack SITES = ${HOMEPAGE}/dist/ @@ -25,7 +25,6 @@ LIB_DEPENDS-main = audio/libvorbis MULTI_PACKAGES = -main -python MODULES = lang/python x11/tk -MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2} BUILD_DEPENDS = ${MODTK_BUILD_DEPENDS} RUN_DEPENDS-main = ${MODTK_RUN_DEPENDS} @@ -39,11 +38,9 @@ CONFIGURE_ARGS = --with-tcl=${MODTCL_LIB --with-tk=${MODTK_LIBDIR} \ --with-ogg-include=${LOCALBASE}/include \ --with-ogg-lib=${LOCALBASE}/lib -MAKE_FLAGS += SNACK_INSTALL_PATH=${MODTCL_TCLDIR} +MAKE_FLAGS += SNACK_INSTALL_PATH=${MODTCL_TCLDIR} TEST_TARGET = test - -MODPY_ADJ_FILES = demos/python/*.py pre-configure: cp ${FILESDIR}/jkAudIO_sndio.c ${WRKSRC}/unix/ Index: audio/snack/patches/patch-demos_python_MinSect_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_MinSect_py diff -N audio/snack/patches/patch-demos_python_MinSect_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_MinSect_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/MinSect.py +--- demos/python/MinSect.py.orig ++++ demos/python/MinSect.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_MinSpeg_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_MinSpeg_py diff -N audio/snack/patches/patch-demos_python_MinSpeg_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_MinSpeg_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/MinSpeg.py +--- demos/python/MinSpeg.py.orig ++++ demos/python/MinSpeg.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_MinWave_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_MinWave_py diff -N audio/snack/patches/patch-demos_python_MinWave_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_MinWave_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/MinWave.py +--- demos/python/MinWave.py.orig ++++ demos/python/MinWave.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_dataCmd_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_dataCmd_py diff -N audio/snack/patches/patch-demos_python_dataCmd_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_dataCmd_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,12 @@ +Index: demos/python/dataCmd.py +--- demos/python/dataCmd.py.orig ++++ demos/python/dataCmd.py +@@ -1,7 +1,7 @@ + #! /usr/bin/env python + # -*- coding: iso-8859-1 -*- + +-import Tkinter ++import tkinter as Tkinter + import tkSnack + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_echo_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_echo_py diff -N audio/snack/patches/patch-demos_python_echo_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_echo_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/echo.py +--- demos/python/echo.py.orig ++++ demos/python/echo.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_generator_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_generator_py diff -N audio/snack/patches/patch-demos_python_generator_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_generator_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/generator.py +--- demos/python/generator.py.orig ++++ demos/python/generator.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_mixplay_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_mixplay_py diff -N audio/snack/patches/patch-demos_python_mixplay_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_mixplay_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/mixplay.py +--- demos/python/mixplay.py.orig ++++ demos/python/mixplay.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_notescale_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_notescale_py diff -N audio/snack/patches/patch-demos_python_notescale_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_notescale_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/notescale.py +--- demos/python/notescale.py.orig ++++ demos/python/notescale.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_oggplay_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_oggplay_py diff -N audio/snack/patches/patch-demos_python_oggplay_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_oggplay_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,18 @@ +Index: demos/python/oggplay.py +--- demos/python/oggplay.py.orig ++++ demos/python/oggplay.py +@@ -6,7 +6,7 @@ + # by tkSnack + + import sys +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + initializeSnack(Tkinter.Tk()) +@@ -19,4 +19,4 @@ if sys.argv[1:]: + snd = Sound(file=sys.argv[1]) + snd.play(blocking=1) + else: +- print "Usage: oggplay.py file.ogg" ++ print("Usage: oggplay.py file.ogg") Index: audio/snack/patches/patch-demos_python_playnotes_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_playnotes_py diff -N audio/snack/patches/patch-demos_python_playnotes_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_playnotes_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/playnotes.py +--- demos/python/playnotes.py.orig ++++ demos/python/playnotes.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_polarspec_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_polarspec_py diff -N audio/snack/patches/patch-demos_python_polarspec_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_polarspec_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/polarspec.py +--- demos/python/polarspec.py.orig ++++ demos/python/polarspec.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + from math import * + Index: audio/snack/patches/patch-demos_python_spectrogram_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_spectrogram_py diff -N audio/snack/patches/patch-demos_python_spectrogram_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_spectrogram_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/spectrogram.py +--- demos/python/spectrogram.py.orig ++++ demos/python/spectrogram.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-demos_python_sphere_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_sphere_py diff -N audio/snack/patches/patch-demos_python_sphere_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_sphere_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,26 @@ +Index: demos/python/sphere.py +--- demos/python/sphere.py.orig ++++ demos/python/sphere.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() +@@ -15,11 +15,11 @@ snd = Sound() + + file = 'test.sph' + +-print 'reading sphere file \'%s\'' % file ++print('reading sphere file \'%s\'' % file) + snd.read(file) + +-print 'playing file \'%s\'' % file ++print('playing file \'%s\'' % file) + snd.play(blocking=1) + +-print 'writing wav file \'%s\'' % file ++print('writing wav file \'%s\'' % file) + snd.write('new.wav') Index: audio/snack/patches/patch-demos_python_tkSnack_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_tkSnack_py diff -N audio/snack/patches/patch-demos_python_tkSnack_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_tkSnack_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,57 @@ +Index: demos/python/tkSnack.py +--- demos/python/tkSnack.py.orig ++++ demos/python/tkSnack.py +@@ -7,7 +7,7 @@ by Kevin Russell and Kare Sjolander + last modified: Mar 28, 2003 + """ + +-import Tkinter ++import tkinter as Tkinter + import types + import string + +@@ -20,7 +20,6 @@ def initializeSnack(newroot): + Tkroot = newroot + Tkroot.tk.call('eval', 'package require snack') + Tkroot.tk.call('snack::createIcons') +- Tkroot.tk.call('snack::setUseOldObjAPI') + audio = AudioControllerSingleton() + mixer = MixerControllerSingleton() + +@@ -92,7 +91,7 @@ class TkObject: + self.tk.call(self.name, 'configure')): + cnf[x[0][1:]] = (x[0][1:],) + x[1:] + return cnf +- if type(cnf) is types.StringType: ++ if isinstance(cnf, str): + x = self.tk.split(self.tk.call(self.name, 'configure', '-'+cnf)) + return (x[0][1:],) + x[1:] + self.tk.call((self.name, 'configure') + self._options(cnf)) +@@ -124,8 +123,7 @@ class Sound (TkObject): + if Tkroot: + master = Tkroot + else: +- raise RuntimeError, \ +- 'Tk not intialized or not registered with Snack' ++ raise RuntimeError('Tk not intialized or not registered with Snack') + self.tk = master.tk + if not name: + self.name = self.tk.call(('sound',) + self._options(kw)) +@@ -261,7 +259,7 @@ class Sound (TkObject): + + def pitch(self, method=None, **kw): + """Returns a list of pitch values.""" +- if method is None or method is "amdf" or method is "AMDF": ++ if method is None or method=="amdf" or method=="AMDF": + result = self.tk.call((self.name, 'pitch') + self._options(kw)) + return self._getdoubles(result) + else: +@@ -537,7 +535,7 @@ class SoundFrame(Tkinter.Frame): + self.sound.record() + + def info(self): +- print self.sound.info() ++ print(self.sound.info()) + + def createSpectrogram(canvas, *args, **kw): + """Draws a spectrogram of a sound on canvas.""" Index: audio/snack/patches/patch-demos_python_widget_py =================================================================== RCS file: audio/snack/patches/patch-demos_python_widget_py diff -N audio/snack/patches/patch-demos_python_widget_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-demos_python_widget_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,11 @@ +Index: demos/python/widget.py +--- demos/python/widget.py.orig ++++ demos/python/widget.py +@@ -1,6 +1,6 @@ + #! /usr/bin/env python + +-from Tkinter import * ++from tkinter import * + from tkSnack import * + + root = Tkinter.Tk() Index: audio/snack/patches/patch-python_tkSnack_py =================================================================== RCS file: audio/snack/patches/patch-python_tkSnack_py diff -N audio/snack/patches/patch-python_tkSnack_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/snack/patches/patch-python_tkSnack_py 24 Sep 2023 08:53:17 -0000 @@ -0,0 +1,67 @@ +Index: python/tkSnack.py +--- python/tkSnack.py.orig ++++ python/tkSnack.py +@@ -7,7 +7,7 @@ by Kevin Russell and Kare Sjolander + last modified: Mar 28, 2003 + """ + +-import Tkinter ++import tkinter as Tkinter + import types + import string + +@@ -20,7 +20,6 @@ def initializeSnack(newroot): + Tkroot = newroot + Tkroot.tk.call('eval', 'package require snack') + Tkroot.tk.call('snack::createIcons') +- Tkroot.tk.call('snack::setUseOldObjAPI') + audio = AudioControllerSingleton() + mixer = MixerControllerSingleton() + +@@ -92,7 +91,7 @@ class TkObject: + self.tk.call(self.name, 'configure')): + cnf[x[0][1:]] = (x[0][1:],) + x[1:] + return cnf +- if type(cnf) is types.StringType: ++ if isinstance(cnf, str): + x = self.tk.split(self.tk.call(self.name, 'configure', '-'+cnf)) + return (x[0][1:],) + x[1:] + self.tk.call((self.name, 'configure') + self._options(cnf)) +@@ -124,8 +123,7 @@ class Sound (TkObject): + if Tkroot: + master = Tkroot + else: +- raise RuntimeError, \ +- 'Tk not intialized or not registered with Snack' ++ raise RuntimeError('Tk not intialized or not registered with Snack') + self.tk = master.tk + if not name: + self.name = self.tk.call(('sound',) + self._options(kw)) +@@ -261,7 +259,7 @@ class Sound (TkObject): + + def pitch(self, method=None, **kw): + """Returns a list of pitch values.""" +- if method is None or method is "amdf" or method is "AMDF": ++ if method is None or method=="amdf" or method=="AMDF": + result = self.tk.call((self.name, 'pitch') + self._options(kw)) + return self._getdoubles(result) + else: +@@ -409,8 +407,7 @@ class Filter(TkObject): + if Tkroot: + master = Tkroot + else: +- raise RuntimeError, \ +- 'Tk not intialized or not registered with Snack' ++ raise RuntimeError('Tk not intialized or not registered with Snack') + self.tk = master.tk + self.name = self.tk.call(('snack::filter', name) + args + + self._options(kw)) +@@ -537,7 +534,7 @@ class SoundFrame(Tkinter.Frame): + self.sound.record() + + def info(self): +- print self.sound.info() ++ print(self.sound.info()) + + def createSpectrogram(canvas, *args, **kw): + """Draws a spectrogram of a sound on canvas.""" Index: audio/snack/pkg/PLIST-main =================================================================== RCS file: /cvs/ports/audio/snack/pkg/PLIST-main,v retrieving revision 1.2 diff -u -p -r1.2 PLIST-main --- audio/snack/pkg/PLIST-main 11 Mar 2022 18:20:31 -0000 1.2 +++ audio/snack/pkg/PLIST-main 24 Sep 2023 09:11:33 -0000 @@ -1,8 +1,10 @@ -lib/libsnackstub2.2.a +@static-lib lib/libsnackstub2.2.a +lib/python${MODPY_VERSION}/ +lib/python${MODPY_VERSION}/site-packages/ lib/tcl/snack/ -lib/tcl/snack/libsnack.so -lib/tcl/snack/libsnackogg.so -lib/tcl/snack/libsound.so +@so lib/tcl/snack/libsnack.so +@so lib/tcl/snack/libsnackogg.so +@so lib/tcl/snack/libsound.so lib/tcl/snack/pkgIndex.tcl lib/tcl/snack/snack.tcl share/doc/snack/ Index: audio/snack/pkg/PLIST-python =================================================================== RCS file: /cvs/ports/audio/snack/pkg/PLIST-python,v retrieving revision 1.3 diff -u -p -r1.3 PLIST-python --- audio/snack/pkg/PLIST-python 11 Mar 2022 18:20:31 -0000 1.3 +++ audio/snack/pkg/PLIST-python 24 Sep 2023 08:59:47 -0000 @@ -1,6 +1,12 @@ -lib/python${MODPY_VERSION}/site-packages/tkSnack-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info +@conflict py-snack-* +lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}tkSnack.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/tkSnack-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/ +lib/python${MODPY_VERSION}/site-packages/tkSnack-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO +lib/python${MODPY_VERSION}/site-packages/tkSnack-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt +lib/python${MODPY_VERSION}/site-packages/tkSnack-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt +lib/python${MODPY_VERSION}/site-packages/tkSnack-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt lib/python${MODPY_VERSION}/site-packages/tkSnack.py -lib/python${MODPY_VERSION}/site-packages/tkSnack.pyc share/doc/snack/python-man.html share/examples/snack/python/ share/examples/snack/python/MinSect.py