Open olebole opened 1 year ago
Interesting! The Debian package is not maintained by myself, but I can certainly imagine that this is troublesome... The package require
lines are not necessary for ttkthemes
to work in a Python/Tkinter-context. However, I am a bit confused that ttkthemes
appears to get auto-loaded when loading Tk
. That's where I would imagine the circular-import error comes from.
I think that might be because of this file (Disclaimer: I have never actually built Debian packages from scratch!)
Either you'd have to file some bug report with the maintainer of the Debian package. Otherwise, I'll consider removing the lines. The reason they're there is enforce Tk 8.6 over, say, Tk 8.5 (shipped with Python 2.7). Let me know your thoughts, and in case you find where to open a bug report with the maintainers, I can opine over there as well.
Edit: I should improve my reading skills 🤦🏻♂️ . Sorry, I did not immediately realize that you are actually the packager for Debian (#77). There are two options, I think. Either:
package require
line is removed, making the non-support for Python 2.7/Tk <8.6 implicitttkthemes
is no longer auto-loaded when Tk
is loaded, which I think can be implemented by updating the Debian packagePersonally, I am in favour of option 2.
I added the pkgIndex.tcl in the Debian package to make ttkthemes easily loadable in SAOImageDS9 with package require ttk::theme::XXX
, for which it is a dependency.
Since Debian only supports Tcl8.6 and Python 3, I'd prefer option 1, and could remove the package require
lines also locally in the Debian package. However, it may be that I misunderstood something and there is a better solution than my hand-made pkgIndex.tcl
.
For the Debian package of ttkthemes, I got a the bug report Debian#1021389:
The reason for this seems the lines https://github.com/TkinterEP/ttkthemes/blob/87fa24f3cc9f78c5d4660f1a3f1b8807f6fa57fe/ttkthemes/advanced/pkgIndex.tcl#L5 and https://github.com/TkinterEP/ttkthemes/blob/87fa24f3cc9f78c5d4660f1a3f1b8807f6fa57fe/ttkthemes/png/pkgIndex.tcl#L5
which were introduced in https://github.com/TkinterEP/ttkthemes/commit/87fa24f3cc9f78c5d4660f1a3f1b8807f6fa57fe (part of #66).
Removing these lines fixes the problem; however I am not sure whether ttkthemes then still works properly. Can you check that?