Coverage for src/ezcompiler/__init__.py: 100.00%

13 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-07-04 11:22 +0000

1# /////////////////////////////////////////////////////////////// 

2# EZCOMPILER - Main Module 

3# Project: ezcompiler 

4# /////////////////////////////////////////////////////////////// 

5 

6""" 

7EzCompiler - Project compilation and distribution framework. 

8 

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. 

12 

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 

21 

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 

27 

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 >>> compiler.upload() 

41""" 

42 

43from __future__ import annotations 

44 

45from ._types import ( 

46 CompilerName, 

47 CompilerPort, 

48 FilePath, 

49 IncludeFiles, 

50 JsonMap, 

51 ReleaseDestination, 

52 ReleaserPort, 

53 ReleaseTarget, 

54 RepoDestination, 

55 UploaderPort, 

56) 

57 

58# /////////////////////////////////////////////////////////////// 

59# IMPORTS 

60# /////////////////////////////////////////////////////////////// 

61# Local imports 

62from ._version import __version__ 

63from .interfaces import EzCompiler 

64from .shared import ( 

65 CompilationError, 

66 CompilerConfig, 

67 ConfigurationError, 

68 EzCompilerError, 

69 FileOperationError, 

70 ReleaseError, 

71 TemplateError, 

72 UpdaterError, 

73 UploadError, 

74 VersionError, 

75) 

76 

77# /////////////////////////////////////////////////////////////// 

78# METADATA INFORMATION 

79# /////////////////////////////////////////////////////////////// 

80 

81__author__ = "Neuraaak" 

82__maintainer__ = "Neuraaak" 

83__description__ = "Project compilation and distribution framework for Python" 

84__python_requires__ = ">=3.13" 

85__keywords__ = [ 

86 "compilation", 

87 "packaging", 

88 "distribution", 

89 "cx_freeze", 

90 "pyinstaller", 

91 "nuitka", 

92] 

93__url__ = "https://github.com/neuraaak/ezcompiler" 

94__repository__ = "https://github.com/neuraaak/ezcompiler" 

95 

96# /////////////////////////////////////////////////////////////// 

97# PUBLIC API 

98# /////////////////////////////////////////////////////////////// 

99 

100__all__ = [ 

101 # Main orchestration class 

102 "EzCompiler", 

103 # Configuration 

104 "CompilerConfig", 

105 # Type aliases 

106 "FilePath", 

107 "CompilerName", 

108 "RepoDestination", 

109 "ReleaseDestination", 

110 "IncludeFiles", 

111 "JsonMap", 

112 # Type aliases 

113 "ReleaseTarget", 

114 # Ports (structural contracts) 

115 "CompilerPort", 

116 "UploaderPort", 

117 "ReleaserPort", 

118 # Exceptions 

119 "EzCompilerError", 

120 "CompilationError", 

121 "ConfigurationError", 

122 "ReleaseError", 

123 "TemplateError", 

124 "UpdaterError", 

125 "UploadError", 

126 "VersionError", 

127 "FileOperationError", 

128 # Metadata 

129 "__version__", 

130 "__author__", 

131 "__maintainer__", 

132 "__python_requires__", 

133 "__description__", 

134 "__keywords__", 

135 "__repository__", 

136 "__url__", 

137]