talks-reducer 0.8.0__py3-none-any.whl → 0.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.8.0"
5
+ __version__ = "0.8.2"
@@ -5,6 +5,7 @@ from __future__ import annotations
5
5
  import argparse
6
6
  import importlib
7
7
  import json
8
+ import platform
8
9
  import subprocess
9
10
  import sys
10
11
  from pathlib import Path
@@ -13,6 +14,32 @@ from typing import Optional, Sequence, Tuple
13
14
  from ..cli import main as cli_main
14
15
  from .app import TalksReducerGUI
15
16
 
17
+ _runtime_logged = False
18
+
19
+
20
+ def _log_python_runtime() -> None:
21
+ """Emit the active Python runtime details once for troubleshooting."""
22
+
23
+ global _runtime_logged
24
+ if _runtime_logged:
25
+ return
26
+
27
+ _runtime_logged = True
28
+
29
+ try:
30
+ implementation = platform.python_implementation()
31
+ except Exception: # pragma: no cover - extremely defensive fallback
32
+ implementation = "Python"
33
+
34
+ try:
35
+ version = platform.python_version()
36
+ except Exception: # pragma: no cover - platform module unavailable
37
+ version = sys.version.split()[0]
38
+
39
+ sys.stdout.write(
40
+ f"[Talks Reducer] Runtime: {implementation} {version} (executable: {sys.executable})\n"
41
+ )
42
+
16
43
 
17
44
  def _check_tkinter_available() -> Tuple[bool, str]:
18
45
  """Check if tkinter can create windows without importing it globally."""
@@ -88,6 +115,8 @@ if __name__ == "__main__":
88
115
  def main(argv: Optional[Sequence[str]] = None) -> bool:
89
116
  """Launch the GUI when run without arguments, otherwise defer to the CLI."""
90
117
 
118
+ _log_python_runtime()
119
+
91
120
  if argv is None:
92
121
  argv = sys.argv[1:]
93
122
 
@@ -123,6 +152,9 @@ def main(argv: Optional[Sequence[str]] = None) -> bool:
123
152
  )
124
153
  argv = remaining
125
154
 
155
+ if sys.platform == "darwin":
156
+ argv = [arg for arg in argv if not arg.startswith("-psn_")]
157
+
126
158
  if argv:
127
159
  launch_gui = False
128
160
  if sys.platform == "win32" and not any(arg.startswith("-") for arg in argv):
File without changes
@@ -0,0 +1,52 @@
1
+ """PyInstaller runtime hook ensuring Tcl/Tk uses bundled resources."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import sys
7
+ from pathlib import Path
8
+
9
+
10
+ def _select_latest(directory: Path, prefix: str) -> Path | None:
11
+ """Pick the newest matching child directory within *directory*."""
12
+
13
+ if not directory.exists() or not directory.is_dir():
14
+ return None
15
+
16
+ candidates = [child for child in directory.iterdir() if child.is_dir() and child.name.lower().startswith(prefix)]
17
+ if not candidates:
18
+ return None
19
+
20
+ def sort_key(item: Path) -> float:
21
+ try:
22
+ return item.stat().st_mtime
23
+ except OSError:
24
+ return 0.0
25
+
26
+ candidates.sort(key=sort_key, reverse=True)
27
+ return candidates[0]
28
+
29
+
30
+ def configure_tk_paths() -> None:
31
+ """Set Tcl/Tk environment variables when running from a PyInstaller bundle."""
32
+
33
+ if not getattr(sys, "frozen", False):
34
+ return
35
+
36
+ base = getattr(sys, "_MEIPASS", None)
37
+ if not base:
38
+ return
39
+
40
+ bundle_root = Path(base)
41
+
42
+ tcl_dir = _select_latest(bundle_root / "tcl", "tcl")
43
+ tk_dir = _select_latest(bundle_root / "tk", "tk")
44
+
45
+ if tcl_dir and "TCL_LIBRARY" not in os.environ:
46
+ os.environ["TCL_LIBRARY"] = str(tcl_dir)
47
+
48
+ if tk_dir and "TK_LIBRARY" not in os.environ:
49
+ os.environ["TK_LIBRARY"] = str(tk_dir)
50
+
51
+
52
+ configure_tk_paths()
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talks-reducer
3
- Version: 0.8.0
3
+ Version: 0.8.2
4
4
  Summary: CLI for speeding up long-form talks by removing silence
5
5
  Author: Talks Reducer Maintainers
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
- talks_reducer/__about__.py,sha256=utyM7vPaN3BCqdzGixouWTlzTCZvliX_-gFu6cJYQEQ,92
1
+ talks_reducer/__about__.py,sha256=UK6LeJIQPqrM0cgW2SA2nlHW5iUfx9HM9JIvrwfz_x8,92
2
2
  talks_reducer/__init__.py,sha256=Kzh1hXaw6Vq3DyTqrnJGOq8pn0P8lvaDcsg1bFUjFKk,208
3
3
  talks_reducer/__main__.py,sha256=azR_vh8HFPLaOnh-L6gUFWsL67I6iHtbeH5rQhsipGY,299
4
4
  talks_reducer/audio.py,sha256=sjHMeY0H9ESG-Gn5BX0wFRBX7sXjWwsgS8u9Vb0bJ88,4396
@@ -22,12 +22,17 @@ talks_reducer/gui/layout.py,sha256=k1FvZ55I96ue96Debf63dtX3-6bmnWL8PbsSQ6cT6qE,1
22
22
  talks_reducer/gui/preferences.py,sha256=ahDLPNIzvL71sw8WvgY9-TV_kaWTl_JTkn1gf2Z1EaA,3531
23
23
  talks_reducer/gui/progress.py,sha256=wvIyqkpsC7qNvDlcf4G7Ts6P-VM_dPkcJqSvyYr2af8,2388
24
24
  talks_reducer/gui/remote.py,sha256=kpwYqizupw8szoIAf2O25xcZNoIK2ILryQMmANvI5PI,12330
25
- talks_reducer/gui/startup.py,sha256=mJNLVd7ooYHaUuYnym06AK4hz8mJZbxzwgI3PQCQ3Ds,6588
25
+ talks_reducer/gui/startup.py,sha256=038PqueHkfwS0uJaEy69c3XX56NrJWFzAxLOmDSveFA,7432
26
26
  talks_reducer/gui/theme.py,sha256=ueqpPVPOwnLkeHlOlWkUcdcoClJrAqz9LWT79p33Xic,7718
27
+ talks_reducer/pyinstaller_hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ talks_reducer/pyinstaller_hooks/tkinter_env.py,sha256=jjapcur4s8C9AlS8928R0WoTP-7hEvJOx2vWcq8iRCs,1363
27
29
  talks_reducer/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- talks_reducer-0.8.0.dist-info/licenses/LICENSE,sha256=jN17mHNR3e84awmH3AbpWBcBDBzPxEH0rcOFoj1s7sQ,1124
29
- talks_reducer-0.8.0.dist-info/METADATA,sha256=XVLE5qg3XNgRFaFl9cAJ2nAFAoB2MLki-GUrOPfhync,10160
30
- talks_reducer-0.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- talks_reducer-0.8.0.dist-info/entry_points.txt,sha256=X2pjoh2vWBXXExVWorv1mbA1aTEVP3fyuZH4AixqZK4,208
32
- talks_reducer-0.8.0.dist-info/top_level.txt,sha256=pJWGcy__LR9JIEKH3QJyFmk9XrIsiFtqvuMNxFdIzDU,14
33
- talks_reducer-0.8.0.dist-info/RECORD,,
30
+ talks_reducer/resources/icons/app-256.png,sha256=rdXzWwK9K_ExVAU_I7SetNCnAswj336XGf4tdl7FZD0,30832
31
+ talks_reducer/resources/icons/app.icns,sha256=5e2UQeZYlA5IPbDuQDNKZCLctykNwYDYRx5YdWdYXJw,635295
32
+ talks_reducer/resources/icons/app.ico,sha256=6CwNsT1W7rmWH3txQlotvScW-rqnSKa63W7Q1ESazvk,132730
33
+ talks_reducer-0.8.2.dist-info/licenses/LICENSE,sha256=jN17mHNR3e84awmH3AbpWBcBDBzPxEH0rcOFoj1s7sQ,1124
34
+ talks_reducer-0.8.2.dist-info/METADATA,sha256=K_8P5At8IfmVEE31013e0hc6goNp34vTuK8srdCuEMk,10160
35
+ talks_reducer-0.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ talks_reducer-0.8.2.dist-info/entry_points.txt,sha256=X2pjoh2vWBXXExVWorv1mbA1aTEVP3fyuZH4AixqZK4,208
37
+ talks_reducer-0.8.2.dist-info/top_level.txt,sha256=pJWGcy__LR9JIEKH3QJyFmk9XrIsiFtqvuMNxFdIzDU,14
38
+ talks_reducer-0.8.2.dist-info/RECORD,,