diff --git a/README.md b/README.md index d1e9e6b..afa7045 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,9 @@ bellande_python_executable script.py \ ### Command Line Options -- `script` - Python script to convert (required) -- `-o, --output` - Output executable name -- `-n, --name` - Name of the executable +- `--script` - Python script to convert (required) +- `--output` - Output executable name +- `--name` - Name of the executable - `--onefile` - Create a single executable file (default) - `--windowed` - Create windowed application (no console) - `--debug` - Enable debug mode @@ -114,7 +114,7 @@ if __name__ == "__main__": ``` ```bash -bellande_python_executable web_scraper.py --include requests --include bs4 +bellande_python_executable --script web_scraper.py --include requests --include bs4 ./dist/web_scraper ``` @@ -134,7 +134,7 @@ if __name__ == "__main__": ``` ```bash -bellande_python_executable config_app.py --add-data "config.json:." +bellande_python_executable --script-file config_app.py --add-data "config.json:." ./dist/config_app ``` diff --git a/__pycache__/header_imports.cpython-38.pyc b/__pycache__/header_imports.cpython-38.pyc new file mode 100644 index 0000000..716e884 Binary files /dev/null and b/__pycache__/header_imports.cpython-38.pyc differ diff --git a/header_imports.py b/header_imports.py index 974001f..d2c7e45 100644 --- a/header_imports.py +++ b/header_imports.py @@ -1,6 +1,7 @@ # Contain Everything import sys sys.path.append("header_imports/") +sys.path.append("src/") # Header Initialization from header_imports_python_library import * diff --git a/header_imports/__init__.py b/header_imports/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/header_imports/__pycache__/__init__.cpython-38.pyc b/header_imports/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..fb5f673 Binary files /dev/null and b/header_imports/__pycache__/__init__.cpython-38.pyc differ diff --git a/header_imports/__pycache__/header_imports_initialization.cpython-38.pyc b/header_imports/__pycache__/header_imports_initialization.cpython-38.pyc new file mode 100644 index 0000000..ba1ffc6 Binary files /dev/null and b/header_imports/__pycache__/header_imports_initialization.cpython-38.pyc differ diff --git a/header_imports/__pycache__/header_imports_python_library.cpython-38.pyc b/header_imports/__pycache__/header_imports_python_library.cpython-38.pyc new file mode 100644 index 0000000..1e4394f Binary files /dev/null and b/header_imports/__pycache__/header_imports_python_library.cpython-38.pyc differ diff --git a/header_imports/header_imports_python_library.py b/header_imports/header_imports_python_library.py index cf8732a..2b1e58b 100644 --- a/header_imports/header_imports_python_library.py +++ b/header_imports/header_imports_python_library.py @@ -1,3 +1,4 @@ import argparse, importlib.util, sys, os, ast, shutil, time, py_compile, marshal, zipfile, subprocess, tempfile from pathlib import Path from typing import Set, List, Dict, Optional +from dataclasses import dataclass diff --git a/main.py b/main.py index 61e2383..9d6237b 100644 --- a/main.py +++ b/main.py @@ -7,9 +7,9 @@ from header_imports import * def main(): parser = argparse.ArgumentParser(description='Convert Python scripts to executables') - parser.add_argument('-script', help='Python script or file to convert') - parser.add_argument('-o', '--output', help='Output executable name') - parser.add_argument('-n', '--name', help='Name of the executable') + parser.add_argument('--script_file', help='Python script or file to convert') + parser.add_argument('--output', help='Output executable name') + parser.add_argument('--name', help='Name of the executable') parser.add_argument('--onefile', action='store_true', help='Create a single executable file') parser.add_argument('--windowed', action='store_true', help='Create windowed application (no console)') parser.add_argument('--debug', action='store_true', help='Enable debug mode') @@ -23,7 +23,7 @@ def main(): logger = Logger(debug=args.debug) # Validate input script - script_path = Path(args.script) + script_path = Path(args.script_file) if not script_path.exists(): logger.error(f"Script not found: {script_path}") sys.exit(1) diff --git a/scripts/bellande_python_executable_test.sh b/scripts/bellande_python_executable_test.sh index 69a036a..c6df9e2 100755 --- a/scripts/bellande_python_executable_test.sh +++ b/scripts/bellande_python_executable_test.sh @@ -1,5 +1,6 @@ -python3 main.py -script ../test_files/test.py \ +python3 ../main.py \ + --script_file ../test_files/test.py \ --output Test \ - -n Test_Name \ + --name Test_Name \ --onefile \ --windowed diff --git a/src/__pycache__/analyzer.cpython-38.pyc b/src/__pycache__/analyzer.cpython-38.pyc new file mode 100644 index 0000000..9e795db Binary files /dev/null and b/src/__pycache__/analyzer.cpython-38.pyc differ diff --git a/src/__pycache__/builder.cpython-38.pyc b/src/__pycache__/builder.cpython-38.pyc new file mode 100644 index 0000000..f43af49 Binary files /dev/null and b/src/__pycache__/builder.cpython-38.pyc differ diff --git a/src/__pycache__/collector.cpython-38.pyc b/src/__pycache__/collector.cpython-38.pyc new file mode 100644 index 0000000..d4dc5fa Binary files /dev/null and b/src/__pycache__/collector.cpython-38.pyc differ diff --git a/src/__pycache__/compiler.cpython-38.pyc b/src/__pycache__/compiler.cpython-38.pyc new file mode 100644 index 0000000..ad2fa0e Binary files /dev/null and b/src/__pycache__/compiler.cpython-38.pyc differ diff --git a/src/__pycache__/utilities.cpython-38.pyc b/src/__pycache__/utilities.cpython-38.pyc new file mode 100644 index 0000000..f8cf1d9 Binary files /dev/null and b/src/__pycache__/utilities.cpython-38.pyc differ