auto-editor 29.0.1__tar.gz → 29.0.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-editor
3
- Version: 29.0.1
3
+ Version: 29.0.2
4
4
  Summary: Auto-Editor: Effort free video editing!
5
5
  Author-email: WyattBlue <wyattblue@auto-editor.com>
6
6
  License-Expression: Unlicense
@@ -0,0 +1 @@
1
+ __version__ = "29.0.2"
@@ -0,0 +1,91 @@
1
+ """Main entry point for auto-editor when run as a module."""
2
+
3
+ import platform
4
+ import subprocess
5
+ import sys
6
+ import urllib.request
7
+ from pathlib import Path
8
+
9
+ from . import __version__
10
+
11
+ if __version__.startswith("29.0."):
12
+ version = "29.0.0"
13
+ else:
14
+ version = __version__
15
+
16
+
17
+ def get_binary_info():
18
+ """Get the appropriate binary name and download URL for this platform."""
19
+ system = platform.system().lower()
20
+ machine = platform.machine().lower()
21
+
22
+ if system == "windows":
23
+ binary_name = "auto-editor-windows-amd64.exe"
24
+ local_name = "auto-editor.exe"
25
+ elif system == "darwin":
26
+ if machine == "arm64":
27
+ binary_name = "auto-editor-macos-arm64"
28
+ else:
29
+ binary_name = "auto-editor-macos-x86_64"
30
+ local_name = "auto-editor"
31
+ elif system == "linux":
32
+ binary_name = "auto-editor-linux-x86_64"
33
+ local_name = "auto-editor"
34
+ else:
35
+ raise RuntimeError(f"Unsupported platform: {system} {machine}")
36
+
37
+ # Use the package version to construct the download URL
38
+ url = f"https://github.com/WyattBlue/auto-editor/releases/download/{version}/{binary_name}"
39
+ return binary_name, local_name, url
40
+
41
+
42
+ def download_binary():
43
+ """Download the appropriate binary from GitHub releases."""
44
+ package_dir = Path(__file__).parent
45
+ bin_dir = package_dir / "bin"
46
+ bin_dir.mkdir(parents=True, exist_ok=True)
47
+
48
+ binary_name, local_name, url = get_binary_info()
49
+ binary_path = bin_dir / local_name
50
+
51
+ if binary_path.exists():
52
+ return binary_path
53
+
54
+ print("Downloading auto-editor binary for your platform...")
55
+ print(f"URL: {url}")
56
+
57
+ try:
58
+ urllib.request.urlretrieve(url, binary_path)
59
+ binary_path.chmod(0o755) # Make executable on Unix systems
60
+ print("Download completed successfully!")
61
+ return binary_path
62
+ except Exception as e:
63
+ print(f"Error downloading binary: {e}", file=sys.stderr)
64
+ print(f"Please download manually from: {url}", file=sys.stderr)
65
+ sys.exit(1)
66
+
67
+
68
+ def main():
69
+ package_dir = Path(__file__).parent
70
+
71
+ # Determine the binary name based on platform
72
+ _, local_name, _ = get_binary_info()
73
+ binary_path = package_dir / "bin" / local_name
74
+
75
+ # Download binary if it doesn't exist
76
+ if not binary_path.exists():
77
+ binary_path = download_binary()
78
+
79
+ # Execute the binary with all arguments
80
+ try:
81
+ result = subprocess.run([str(binary_path)] + sys.argv[1:])
82
+ sys.exit(result.returncode)
83
+ except KeyboardInterrupt:
84
+ sys.exit(130)
85
+ except Exception as e:
86
+ print(f"Error running auto-editor: {e}", file=sys.stderr)
87
+ sys.exit(1)
88
+
89
+
90
+ if __name__ == "__main__":
91
+ main()
@@ -0,0 +1,4 @@
1
+ from auto_editor.__main__ import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-editor
3
- Version: 29.0.1
3
+ Version: 29.0.2
4
4
  Summary: Auto-Editor: Effort free video editing!
5
5
  Author-email: WyattBlue <wyattblue@auto-editor.com>
6
6
  License-Expression: Unlicense
@@ -1,7 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
- setup.py
5
4
  auto_editor/__init__.py
6
5
  auto_editor/__main__.py
7
6
  auto_editor/cli.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "auto-editor"
7
- version = "29.0.1"
7
+ version = "29.0.2"
8
8
  description = "Auto-Editor: Effort free video editing!"
9
9
  readme = "README.md"
10
10
  license = "Unlicense"
@@ -23,9 +23,6 @@ auto-editor = "auto_editor.cli:cli"
23
23
  [tool.setuptools.packages.find]
24
24
  include = ["auto_editor*"]
25
25
 
26
- [tool.setuptools.package-data]
27
- auto_editor = ["bin/*"]
28
-
29
26
  [project.urls]
30
27
  "Bug Tracker" = "https://github.com/WyattBlue/auto-editor/issues"
31
28
  "Source Code" = "https://github.com/WyattBlue/auto-editor"
@@ -1,3 +0,0 @@
1
- """Auto-Editor: Effort free video editing!"""
2
-
3
- __version__ = "29.0.1"
@@ -1,38 +0,0 @@
1
- """Main entry point for auto-editor when run as a module."""
2
-
3
- import os
4
- import sys
5
- import subprocess
6
- from pathlib import Path
7
-
8
-
9
- def main():
10
- """Run the auto-editor binary."""
11
- # Find the binary in the package directory
12
- package_dir = Path(__file__).parent
13
-
14
- # Determine the binary name based on platform
15
- if sys.platform.startswith('win'):
16
- binary_name = 'auto-editor.exe'
17
- else:
18
- binary_name = 'auto-editor'
19
-
20
- binary_path = package_dir / 'bin' / binary_name
21
-
22
- if not binary_path.exists():
23
- print(f"Error: auto-editor binary not found at {binary_path}", file=sys.stderr)
24
- sys.exit(1)
25
-
26
- # Execute the binary with all arguments
27
- try:
28
- result = subprocess.run([str(binary_path)] + sys.argv[1:])
29
- sys.exit(result.returncode)
30
- except KeyboardInterrupt:
31
- sys.exit(130)
32
- except Exception as e:
33
- print(f"Error running auto-editor: {e}", file=sys.stderr)
34
- sys.exit(1)
35
-
36
-
37
- if __name__ == '__main__':
38
- main()
@@ -1,12 +0,0 @@
1
- """Command line interface for auto-editor."""
2
-
3
- from auto_editor.__main__ import main
4
-
5
-
6
- def cli():
7
- """Entry point for console script."""
8
- main()
9
-
10
-
11
- if __name__ == '__main__':
12
- cli()
@@ -1,72 +0,0 @@
1
- """Setup script for auto-editor binary distribution."""
2
-
3
- import os
4
- import sys
5
- import shutil
6
- from pathlib import Path
7
- from setuptools import setup, find_packages
8
- from setuptools.command.build_py import build_py
9
-
10
-
11
- class BuildPyCommand(build_py):
12
- """Custom build command to include binary."""
13
-
14
- def run(self):
15
- # Run the normal build
16
- super().run()
17
-
18
- # Copy the binary to the package
19
- self.copy_binary()
20
-
21
- def copy_binary(self):
22
- """Copy the appropriate binary to the package."""
23
- # Determine binary name and source path
24
- if sys.platform.startswith('win'):
25
- binary_name = 'auto-editor.exe'
26
- else:
27
- binary_name = 'auto-editor'
28
-
29
- # Look for binary in current directory (where build places it)
30
- source_binary = Path('.') / binary_name
31
-
32
- if not source_binary.exists():
33
- # Try alternative names for cross-compilation
34
- platform_binaries = [
35
- f'auto-editor-linux-x86_64',
36
- f'auto-editor-macos-x86_64',
37
- f'auto-editor-macos-arm64',
38
- f'auto-editor-windows-amd64.exe'
39
- ]
40
-
41
- for alt_binary in platform_binaries:
42
- alt_path = Path('.') / alt_binary
43
- if alt_path.exists():
44
- source_binary = alt_path
45
- break
46
-
47
- if not source_binary.exists():
48
- print(f"Warning: Binary {binary_name} not found, wheel will not include binary")
49
- return
50
-
51
- # Create bin directory in the built package
52
- package_dir = Path(self.build_lib) / 'auto_editor'
53
- bin_dir = package_dir / 'bin'
54
- bin_dir.mkdir(parents=True, exist_ok=True)
55
-
56
- # Copy binary
57
- dest_binary = bin_dir / binary_name
58
- shutil.copy2(source_binary, dest_binary)
59
-
60
- # Make it executable on Unix systems
61
- if not sys.platform.startswith('win'):
62
- dest_binary.chmod(0o755)
63
-
64
- print(f"Copied binary {source_binary} to {dest_binary}")
65
-
66
-
67
- if __name__ == '__main__':
68
- setup(
69
- cmdclass={
70
- 'build_py': BuildPyCommand,
71
- }
72
- )
File without changes
File without changes
File without changes
File without changes