auto-editor 29.0.5__py3-none-any.whl → 29.2.0__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.
- auto_editor/__init__.py +1 -1
- auto_editor/__main__.py +19 -9
- {auto_editor-29.0.5.dist-info → auto_editor-29.2.0.dist-info}/METADATA +1 -1
- auto_editor-29.2.0.dist-info/RECORD +8 -0
- auto_editor-29.0.5.dist-info/RECORD +0 -8
- {auto_editor-29.0.5.dist-info → auto_editor-29.2.0.dist-info}/WHEEL +0 -0
- {auto_editor-29.0.5.dist-info → auto_editor-29.2.0.dist-info}/entry_points.txt +0 -0
- {auto_editor-29.0.5.dist-info → auto_editor-29.2.0.dist-info}/licenses/LICENSE +0 -0
- {auto_editor-29.0.5.dist-info → auto_editor-29.2.0.dist-info}/top_level.txt +0 -0
auto_editor/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "29.0
|
1
|
+
__version__ = "29.2.0"
|
auto_editor/__main__.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
"""Main entry point for auto-editor when run as a module."""
|
2
|
-
|
3
1
|
import platform
|
4
2
|
import subprocess
|
5
3
|
import sys
|
@@ -8,14 +6,10 @@ from pathlib import Path
|
|
8
6
|
|
9
7
|
from . import __version__
|
10
8
|
|
11
|
-
|
12
|
-
version = "29.0.0"
|
13
|
-
else:
|
14
|
-
version = __version__
|
9
|
+
version = __version__
|
15
10
|
|
16
11
|
|
17
12
|
def get_binary_info():
|
18
|
-
"""Get the appropriate binary name and download URL for this platform."""
|
19
13
|
system = platform.system().lower()
|
20
14
|
machine = platform.machine().lower()
|
21
15
|
|
@@ -34,11 +28,23 @@ def get_binary_info():
|
|
34
28
|
else:
|
35
29
|
raise RuntimeError(f"Unsupported platform: {system} {machine}")
|
36
30
|
|
37
|
-
# Use the package version to construct the download URL
|
38
31
|
url = f"https://github.com/WyattBlue/auto-editor/releases/download/{version}/{binary_name}"
|
39
32
|
return binary_name, local_name, url
|
40
33
|
|
41
34
|
|
35
|
+
def get_binary_version(binary_path):
|
36
|
+
try:
|
37
|
+
result = subprocess.run(
|
38
|
+
[str(binary_path), "--version"],
|
39
|
+
capture_output=True,
|
40
|
+
text=True,
|
41
|
+
timeout=5,
|
42
|
+
)
|
43
|
+
return result.stdout.strip()
|
44
|
+
except Exception:
|
45
|
+
return None
|
46
|
+
|
47
|
+
|
42
48
|
def download_binary():
|
43
49
|
"""Download the appropriate binary from GitHub releases."""
|
44
50
|
package_dir = Path(__file__).parent
|
@@ -49,7 +55,11 @@ def download_binary():
|
|
49
55
|
binary_path = bin_dir / local_name
|
50
56
|
|
51
57
|
if binary_path.exists():
|
52
|
-
|
58
|
+
binary_version = get_binary_version(binary_path)
|
59
|
+
if binary_version == version:
|
60
|
+
return binary_path
|
61
|
+
print(f"Removing outdated version ({binary_version})...")
|
62
|
+
binary_path.unlink()
|
53
63
|
|
54
64
|
print("Downloading auto-editor binary for your platform...")
|
55
65
|
print(f"URL: {url}")
|
@@ -0,0 +1,8 @@
|
|
1
|
+
auto_editor/__init__.py,sha256=bZF0so812ZN8BmAaCcIfvhYAa4o6PJiZsZ2ass3PzZY,23
|
2
|
+
auto_editor/__main__.py,sha256=bKmiCKtkNjsg5tWolnj1HQDJRSFk04gTMdW0zZB8OhQ,2920
|
3
|
+
auto_editor-29.2.0.dist-info/licenses/LICENSE,sha256=yiq99pWITHfqS0pbZMp7cy2dnbreTuvBwudsU-njvIM,1210
|
4
|
+
auto_editor-29.2.0.dist-info/METADATA,sha256=sEfd2XkHdJ16RDzhefAmg92TI23GPGVYo1vodu5BkNk,5984
|
5
|
+
auto_editor-29.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
+
auto_editor-29.2.0.dist-info/entry_points.txt,sha256=it1HC1zBLuXcGRxIGJIJTYg2Haw_30HBNDmIl2GykgQ,58
|
7
|
+
auto_editor-29.2.0.dist-info/top_level.txt,sha256=ky1HUkqq9i034c4CUU_0wBw0xZsxxyGEak1eTbdvpyA,12
|
8
|
+
auto_editor-29.2.0.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
auto_editor/__init__.py,sha256=oJBAC7OVo-wBuVumrjPeX5IdMPeGOLAhynnvvbmeULI,23
|
2
|
-
auto_editor/__main__.py,sha256=NEMPzDOq8BoU5jHceffcDWRJ671j4mLEbGI3R7mBExM,2701
|
3
|
-
auto_editor-29.0.5.dist-info/licenses/LICENSE,sha256=yiq99pWITHfqS0pbZMp7cy2dnbreTuvBwudsU-njvIM,1210
|
4
|
-
auto_editor-29.0.5.dist-info/METADATA,sha256=xTxw8SAKyqXSJg5TMyxl5ckz4glRUpMObl2P8AguvII,5984
|
5
|
-
auto_editor-29.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
-
auto_editor-29.0.5.dist-info/entry_points.txt,sha256=it1HC1zBLuXcGRxIGJIJTYg2Haw_30HBNDmIl2GykgQ,58
|
7
|
-
auto_editor-29.0.5.dist-info/top_level.txt,sha256=ky1HUkqq9i034c4CUU_0wBw0xZsxxyGEak1eTbdvpyA,12
|
8
|
-
auto_editor-29.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|