Coverage for src/ezcompiler/__init__.py: 100.00%
13 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-16 16:37 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-16 16:37 +0000
1# ///////////////////////////////////////////////////////////////
2# EZCOMPILER - Main Module
3# Project: ezcompiler
4# ///////////////////////////////////////////////////////////////
6"""
7EzCompiler - Project compilation and distribution framework.
9EzCompiler is a comprehensive Python framework for project compilation, version
10file generation, packaging, and distribution, with a clean and typed API suitable
11for professional and industrial Python applications.
13**Main Features:**
14 - Multi-compiler support (Cx_Freeze, PyInstaller, Nuitka)
15 - Version file generation for Windows executables
16 - Project packaging to ZIP archives
17 - Upload backends (disk and HTTP server)
18 - Template-based file generation (configuration, setup, version)
19 - File utilities (validation, ZIP operations)
20 - CLI for automation and batch operations
22**Architecture (v2.0.0):**
23 - interfaces: Public interfaces (CLI, Python API)
24 - services: Business logic services
25 - adapters: Compiler protocol implementations
26 - utils: Utility functions and exceptions
28**Quick Start:**
29 >>> from ezcompiler import EzCompiler, CompilerConfig
30 >>> config = CompilerConfig(
31 ... version="1.0.0",
32 ... project_name="MyProject",
33 ... main_file="main.py",
34 ... include_files={"files": [], "folders": []},
35 ... output_folder="dist",
36 ... )
37 >>> compiler = EzCompiler(config)
38 >>> compiler.compile_project()
39 >>> compiler.zip_compiled_project()
40"""
42from __future__ import annotations
44from ._types import (
45 CompilerName,
46 CompilerPort,
47 FilePath,
48 IncludeFiles,
49 JsonMap,
50 ReleaseDestination,
51 ReleaserPort,
52 ReleaseTarget,
53 RepoDestination,
54 UploaderPort,
55)
57# ///////////////////////////////////////////////////////////////
58# IMPORTS
59# ///////////////////////////////////////////////////////////////
60# Local imports
61from ._version import __version__
62from .interfaces import EzCompiler
63from .shared import (
64 CompilationError,
65 CompilerConfig,
66 ConfigurationError,
67 EzCompilerError,
68 FileOperationError,
69 ReleaseError,
70 TemplateError,
71 UpdaterError,
72 UploadError,
73 VersionError,
74)
76# ///////////////////////////////////////////////////////////////
77# METADATA INFORMATION
78# ///////////////////////////////////////////////////////////////
80__author__ = "Neuraaak"
81__maintainer__ = "Neuraaak"
82__description__ = "Project compilation and distribution framework for Python"
83__python_requires__ = ">=3.13"
84__keywords__ = [
85 "compilation",
86 "packaging",
87 "distribution",
88 "cx_freeze",
89 "pyinstaller",
90 "nuitka",
91]
92__url__ = "https://github.com/neuraaak/ezcompiler"
93__repository__ = "https://github.com/neuraaak/ezcompiler"
95# ///////////////////////////////////////////////////////////////
96# PUBLIC API
97# ///////////////////////////////////////////////////////////////
99__all__ = [
100 # Main orchestration class
101 "EzCompiler",
102 # Configuration
103 "CompilerConfig",
104 # Type aliases
105 "FilePath",
106 "CompilerName",
107 "RepoDestination",
108 "ReleaseDestination",
109 "IncludeFiles",
110 "JsonMap",
111 # Type aliases
112 "ReleaseTarget",
113 # Ports (structural contracts)
114 "CompilerPort",
115 "UploaderPort",
116 "ReleaserPort",
117 # Exceptions
118 "EzCompilerError",
119 "CompilationError",
120 "ConfigurationError",
121 "ReleaseError",
122 "TemplateError",
123 "UpdaterError",
124 "UploadError",
125 "VersionError",
126 "FileOperationError",
127 # Metadata
128 "__version__",
129 "__author__",
130 "__maintainer__",
131 "__python_requires__",
132 "__description__",
133 "__keywords__",
134 "__repository__",
135 "__url__",
136]