[PATCH] packaging: drop the infinitepush extension on Windows

9 views
Skip to first unread message

Matt Harbison

unread,
Dec 1, 2023, 12:34:49 AM12/1/23
to thg...@googlegroups.com
# HG changeset patch
# User Matt Harbison <matt_h...@yahoo.com>
# Date 1701408757 18000
# Fri Dec 01 00:32:37 2023 -0500
# Branch stable
# Node ID 5b37f3c2ce73cca261b18cc4b70f23b4844d9e27
# Parent fdc6e290f4cd3121cdc9bdfe15fb870062925404
packaging: drop the infinitepush extension on Windows

This was removed in hg6.6. There are no other references, as only py2exe needed
help understanding it needed to bundle it.

diff --git a/contrib/packaging/thgpackaging/py2exe.py b/contrib/packaging/thgpackaging/py2exe.py
--- a/contrib/packaging/thgpackaging/py2exe.py
+++ b/contrib/packaging/thgpackaging/py2exe.py
@@ -321,7 +321,7 @@
hgext,
hgext.convert, hgext.fastannotate, hgext.fsmonitor,
hgext.fsmonitor.pywatchman, hgext.git, hgext.highlight,
- hgext.hooklib, hgext.infinitepush, hgext.largefiles,
+ hgext.hooklib, hgext.largefiles,
hgext.lfs, hgext.narrow, hgext.remotefilelog, hgext.zeroconf,
mercurial.cext, mercurial.pure, mercurial.defaultrc,


Matt Harbison

unread,
Dec 1, 2023, 12:47:40 AM12/1/23
to TortoiseHg Developers
The last hangup to an RC installer is this error packaging the installer:

[.. snip ..]
  File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 2270, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    {C:\Program Files\TortoiseHg\lib\tcl} {C:/Program Files/TortoiseHg/lib/tcl8.6} C:/Users/Matt/AppData/Local/Programs/Python/Python39/lib/tcl8.6 C:/Users/Matt/AppData/Local/Programs/Python/lib/tcl8.6 C:/Users/Matt/AppData/Local/Programs/lib/tcl8.6 C:/Users/Matt/AppData/Local/Programs/Python/library C:/Users/Matt/AppData/Local/Programs/library C:/Users/Matt/AppData/Local/Programs/tcl8.6.12/library C:/Users/Matt/AppData/Local/tcl8.6.12/library



This probably means that Tcl wasn't installed properly.

I've not idea what this is, who is using it, or why it's suddenly a problem.  I did move the old Qt5 installation that I used to free up some disk space, but if it comes with Qt5, IDK why it wouldn't be installed by pip.  (It also wasn't one of the directories listed above.)  I did manage to get it to build by including:

    excludes = tcl, tkinter

in the *.cfg file used to build the Windows installer, and WiX didn't complain about missing files.  But I'm not sure yet if that improperly excludes *.py files from the library.zip.

Matt Harbison

unread,
Dec 1, 2023, 1:04:55 AM12/1/23
to TortoiseHg Developers
It turns out that with the exclude line, lib/library.zip is missing:

    tkinter/__init__.pyc
    tkinter/constants.pyc

... but py2exe somehow still includes _tkinter.pyd, tcl86t.dll and tk86t.dll in lib/ for the installation directory.

Matt Harbison

unread,
Dec 1, 2023, 1:47:54 AM12/1/23
to TortoiseHg Developers
... and it turns out that Ctrl+Shift+T from thg to spawn a cmd.exe window sets these additional environment variables:

TCL_LIBRARY=C:\Program Files\TortoiseHg\lib\tcl
TK_LIBRARY=C:\Program Files\TortoiseHg\lib\tk

Neither environment variable is in the thg source code, but clearing both allows the packaging to complete.  I can't believe I've never spawned a window this way to do a build, but maybe I always went for the VS command prompt.  The closest thing to both references is:

C:\Program Files\TortoiseHg\lib\tcl86t.dll
C:\Program Files\TortoiseHg\lib\tk86t.dll

I guess I'll just ditch them from the environment in the packaging script, unless there's an obvious fix to this.

Yuya Nishihara

unread,
Dec 1, 2023, 7:57:14 AM12/1/23
to Matt Harbison, thg...@googlegroups.com
On Fri, 01 Dec 2023 00:34:44 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_h...@yahoo.com>
> # Date 1701408757 18000
> # Fri Dec 01 00:32:37 2023 -0500
> # Branch stable
> # Node ID 5b37f3c2ce73cca261b18cc4b70f23b4844d9e27
> # Parent fdc6e290f4cd3121cdc9bdfe15fb870062925404
> packaging: drop the infinitepush extension on Windows

Queued for stable, thanks.
Reply all
Reply to author
Forward
0 new messages