exonware-xwlazy 0.1.0.22__py3-none-any.whl → 1.0.1.2__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.
- exonware/__init__.py +86 -16
- exonware/xwlazy/version.py +5 -5
- exonware/xwlazy.py +2546 -0
- exonware/xwlazy_external_libs.toml +716 -0
- {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/METADATA +6 -6
- exonware_xwlazy-1.0.1.2.dist-info/RECORD +8 -0
- exonware/xwlazy/__init__.py +0 -367
- exonware/xwlazy/common/__init__.py +0 -47
- exonware/xwlazy/common/base.py +0 -56
- exonware/xwlazy/common/cache.py +0 -504
- exonware/xwlazy/common/logger.py +0 -257
- exonware/xwlazy/common/services/__init__.py +0 -72
- exonware/xwlazy/common/services/dependency_mapper.py +0 -232
- exonware/xwlazy/common/services/install_async_utils.py +0 -165
- exonware/xwlazy/common/services/install_cache_utils.py +0 -245
- exonware/xwlazy/common/services/keyword_detection.py +0 -283
- exonware/xwlazy/common/services/spec_cache.py +0 -165
- exonware/xwlazy/common/services/state_manager.py +0 -84
- exonware/xwlazy/common/strategies/__init__.py +0 -28
- exonware/xwlazy/common/strategies/caching_dict.py +0 -44
- exonware/xwlazy/common/strategies/caching_installation.py +0 -88
- exonware/xwlazy/common/strategies/caching_lfu.py +0 -66
- exonware/xwlazy/common/strategies/caching_lru.py +0 -63
- exonware/xwlazy/common/strategies/caching_multitier.py +0 -59
- exonware/xwlazy/common/strategies/caching_ttl.py +0 -59
- exonware/xwlazy/config.py +0 -193
- exonware/xwlazy/contracts.py +0 -1396
- exonware/xwlazy/defs.py +0 -378
- exonware/xwlazy/errors.py +0 -276
- exonware/xwlazy/facade.py +0 -991
- exonware/xwlazy/module/__init__.py +0 -18
- exonware/xwlazy/module/base.py +0 -565
- exonware/xwlazy/module/data.py +0 -17
- exonware/xwlazy/module/facade.py +0 -246
- exonware/xwlazy/module/importer_engine.py +0 -2117
- exonware/xwlazy/module/strategies/__init__.py +0 -22
- exonware/xwlazy/module/strategies/module_helper_lazy.py +0 -93
- exonware/xwlazy/module/strategies/module_helper_simple.py +0 -65
- exonware/xwlazy/module/strategies/module_manager_advanced.py +0 -111
- exonware/xwlazy/module/strategies/module_manager_simple.py +0 -95
- exonware/xwlazy/package/__init__.py +0 -18
- exonware/xwlazy/package/base.py +0 -798
- exonware/xwlazy/package/conf.py +0 -324
- exonware/xwlazy/package/data.py +0 -17
- exonware/xwlazy/package/facade.py +0 -480
- exonware/xwlazy/package/services/__init__.py +0 -84
- exonware/xwlazy/package/services/async_install_handle.py +0 -87
- exonware/xwlazy/package/services/config_manager.py +0 -245
- exonware/xwlazy/package/services/discovery.py +0 -370
- exonware/xwlazy/package/services/host_packages.py +0 -145
- exonware/xwlazy/package/services/install_async.py +0 -277
- exonware/xwlazy/package/services/install_cache.py +0 -145
- exonware/xwlazy/package/services/install_interactive.py +0 -59
- exonware/xwlazy/package/services/install_policy.py +0 -156
- exonware/xwlazy/package/services/install_registry.py +0 -54
- exonware/xwlazy/package/services/install_result.py +0 -17
- exonware/xwlazy/package/services/install_sbom.py +0 -153
- exonware/xwlazy/package/services/install_utils.py +0 -79
- exonware/xwlazy/package/services/installer_engine.py +0 -406
- exonware/xwlazy/package/services/lazy_installer.py +0 -718
- exonware/xwlazy/package/services/manifest.py +0 -496
- exonware/xwlazy/package/services/strategy_registry.py +0 -186
- exonware/xwlazy/package/strategies/__init__.py +0 -57
- exonware/xwlazy/package/strategies/package_discovery_file.py +0 -129
- exonware/xwlazy/package/strategies/package_discovery_hybrid.py +0 -84
- exonware/xwlazy/package/strategies/package_discovery_manifest.py +0 -101
- exonware/xwlazy/package/strategies/package_execution_async.py +0 -113
- exonware/xwlazy/package/strategies/package_execution_cached.py +0 -90
- exonware/xwlazy/package/strategies/package_execution_pip.py +0 -99
- exonware/xwlazy/package/strategies/package_execution_wheel.py +0 -106
- exonware/xwlazy/package/strategies/package_mapping_discovery_first.py +0 -100
- exonware/xwlazy/package/strategies/package_mapping_hybrid.py +0 -105
- exonware/xwlazy/package/strategies/package_mapping_manifest_first.py +0 -100
- exonware/xwlazy/package/strategies/package_policy_allow_list.py +0 -57
- exonware/xwlazy/package/strategies/package_policy_deny_list.py +0 -57
- exonware/xwlazy/package/strategies/package_policy_permissive.py +0 -46
- exonware/xwlazy/package/strategies/package_timing_clean.py +0 -67
- exonware/xwlazy/package/strategies/package_timing_full.py +0 -66
- exonware/xwlazy/package/strategies/package_timing_smart.py +0 -68
- exonware/xwlazy/package/strategies/package_timing_temporary.py +0 -66
- exonware/xwlazy/runtime/__init__.py +0 -18
- exonware/xwlazy/runtime/adaptive_learner.py +0 -129
- exonware/xwlazy/runtime/base.py +0 -274
- exonware/xwlazy/runtime/facade.py +0 -94
- exonware/xwlazy/runtime/intelligent_selector.py +0 -170
- exonware/xwlazy/runtime/metrics.py +0 -60
- exonware/xwlazy/runtime/performance.py +0 -37
- exonware_xwlazy-0.1.0.22.dist-info/RECORD +0 -87
- {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/WHEEL +0 -0
- {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/licenses/LICENSE +0 -0
exonware/__init__.py
CHANGED
|
@@ -1,23 +1,93 @@
|
|
|
1
1
|
"""
|
|
2
|
-
exonware
|
|
2
|
+
exonware.xwlazy - Enterprise Lazy Installation System
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
This is a namespace package allowing multiple exonware subpackages
|
|
10
|
-
to coexist (xwsystem, xwnode, xwdata, xwlazy, etc.)
|
|
4
|
+
Main module for xwlazy auto-installation system.
|
|
5
|
+
Supports both import styles:
|
|
6
|
+
import exonware.xwlazy
|
|
7
|
+
import xwlazy (via convenience import)
|
|
11
8
|
"""
|
|
12
9
|
|
|
13
|
-
#
|
|
14
|
-
# This
|
|
15
|
-
|
|
10
|
+
# Import from xwlazy.py module explicitly using importlib
|
|
11
|
+
# This handles the case where both xwlazy.py and xwlazy/ directory exist
|
|
12
|
+
import sys
|
|
13
|
+
import importlib.util
|
|
14
|
+
from pathlib import Path
|
|
16
15
|
|
|
17
|
-
#
|
|
18
|
-
|
|
16
|
+
# Explicitly load xwlazy.py as a module
|
|
17
|
+
_xwlazy_file = Path(__file__).parent / "xwlazy.py"
|
|
18
|
+
if _xwlazy_file.exists():
|
|
19
|
+
# Load the module explicitly from the .py file
|
|
20
|
+
spec = importlib.util.spec_from_file_location("exonware._xwlazy_module", _xwlazy_file)
|
|
21
|
+
_xwlazy = importlib.util.module_from_spec(spec)
|
|
22
|
+
sys.modules["exonware._xwlazy_module"] = _xwlazy
|
|
23
|
+
spec.loader.exec_module(_xwlazy)
|
|
24
|
+
|
|
25
|
+
# Import all exports from the module
|
|
26
|
+
hook = _xwlazy.hook
|
|
27
|
+
auto_enable_lazy = _xwlazy.auto_enable_lazy
|
|
28
|
+
attach = _xwlazy.attach
|
|
29
|
+
XWLazy = _xwlazy.XWLazy
|
|
30
|
+
enable_keyword_detection = _xwlazy.enable_keyword_detection
|
|
31
|
+
is_keyword_detection_enabled = _xwlazy.is_keyword_detection_enabled
|
|
32
|
+
check_package_keywords = _xwlazy.check_package_keywords
|
|
33
|
+
enable_learning = _xwlazy.enable_learning
|
|
34
|
+
predict_next_imports = _xwlazy.predict_next_imports
|
|
35
|
+
get_all_stats = _xwlazy.get_all_stats
|
|
36
|
+
generate_sbom = _xwlazy.generate_sbom
|
|
37
|
+
get_lockfile = _xwlazy.get_lockfile
|
|
38
|
+
save_lockfile = _xwlazy.save_lockfile
|
|
39
|
+
install_global_import_hook = _xwlazy.install_global_import_hook
|
|
40
|
+
uninstall_global_import_hook = _xwlazy.uninstall_global_import_hook
|
|
41
|
+
is_global_import_hook_installed = _xwlazy.is_global_import_hook_installed
|
|
42
|
+
is_externally_managed = _xwlazy.is_externally_managed
|
|
43
|
+
add_watched_prefix = _xwlazy.add_watched_prefix
|
|
44
|
+
remove_watched_prefix = _xwlazy.remove_watched_prefix
|
|
45
|
+
get_watched_prefixes = _xwlazy.get_watched_prefixes
|
|
46
|
+
is_module_watched = _xwlazy.is_module_watched
|
|
47
|
+
get_cache_stats = _xwlazy.get_cache_stats
|
|
48
|
+
clear_cache = _xwlazy.clear_cache
|
|
49
|
+
invalidate_cache = _xwlazy.invalidate_cache
|
|
50
|
+
get_performance_stats = _xwlazy.get_performance_stats
|
|
51
|
+
clear_performance_stats = _xwlazy.clear_performance_stats
|
|
52
|
+
else:
|
|
53
|
+
raise ImportError("xwlazy.py module not found!")
|
|
19
54
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
55
|
+
# Import version from version module if it exists
|
|
56
|
+
# Note: version.py is at src/exonware/xwlazy/version.py (for hatch build system)
|
|
57
|
+
try:
|
|
58
|
+
_version_file = Path(__file__).parent / "xwlazy" / "version.py"
|
|
59
|
+
if _version_file.exists():
|
|
60
|
+
_version_spec = importlib.util.spec_from_file_location("exonware.xwlazy.version", _version_file)
|
|
61
|
+
_version_module = importlib.util.module_from_spec(_version_spec)
|
|
62
|
+
_version_spec.loader.exec_module(_version_module)
|
|
63
|
+
__version__ = _version_module.__version__
|
|
64
|
+
else:
|
|
65
|
+
__version__ = "1.0.1"
|
|
66
|
+
except (ImportError, AttributeError, Exception):
|
|
67
|
+
# Fallback: use default version
|
|
68
|
+
__version__ = "1.0.1"
|
|
23
69
|
|
|
70
|
+
__all__ = [
|
|
71
|
+
# Core activation
|
|
72
|
+
'hook', 'auto_enable_lazy', 'attach',
|
|
73
|
+
# Main class
|
|
74
|
+
'XWLazy',
|
|
75
|
+
# Keyword detection
|
|
76
|
+
'enable_keyword_detection', 'is_keyword_detection_enabled', 'check_package_keywords',
|
|
77
|
+
# Adaptive learning
|
|
78
|
+
'enable_learning', 'predict_next_imports',
|
|
79
|
+
# Stats & monitoring
|
|
80
|
+
'get_all_stats', 'generate_sbom',
|
|
81
|
+
# Lockfile
|
|
82
|
+
'get_lockfile', 'save_lockfile',
|
|
83
|
+
# Global hook
|
|
84
|
+
'install_global_import_hook', 'uninstall_global_import_hook', 'is_global_import_hook_installed',
|
|
85
|
+
# Utility
|
|
86
|
+
'is_externally_managed',
|
|
87
|
+
# Watched prefixes
|
|
88
|
+
'add_watched_prefix', 'remove_watched_prefix', 'get_watched_prefixes', 'is_module_watched',
|
|
89
|
+
# Cache management
|
|
90
|
+
'get_cache_stats', 'clear_cache', 'invalidate_cache',
|
|
91
|
+
# Performance monitoring
|
|
92
|
+
'get_performance_stats', 'clear_performance_stats',
|
|
93
|
+
]
|
exonware/xwlazy/version.py
CHANGED
|
@@ -14,13 +14,13 @@ All version references should import from this module to ensure consistency.
|
|
|
14
14
|
# =============================================================================
|
|
15
15
|
|
|
16
16
|
# Main version - update this to change version across entire project
|
|
17
|
-
__version__ = "0.1.
|
|
17
|
+
__version__ = "1.0.1.2"
|
|
18
18
|
|
|
19
19
|
# Version components for programmatic access
|
|
20
|
-
VERSION_MAJOR =
|
|
21
|
-
VERSION_MINOR =
|
|
22
|
-
VERSION_PATCH =
|
|
23
|
-
VERSION_BUILD =
|
|
20
|
+
VERSION_MAJOR = 1
|
|
21
|
+
VERSION_MINOR = 0
|
|
22
|
+
VERSION_PATCH = 1
|
|
23
|
+
VERSION_BUILD = 2 # Set to None for releases, or build number for dev builds
|
|
24
24
|
|
|
25
25
|
# Version metadata
|
|
26
26
|
VERSION_SUFFIX = "" # e.g., "dev", "alpha", "beta", "rc1"
|