IncludeCPP 4.6.9__tar.gz → 4.7.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.
- {includecpp-4.6.9 → includecpp-4.7.2}/IncludeCPP.egg-info/PKG-INFO +1 -1
- {includecpp-4.6.9 → includecpp-4.7.2}/PKG-INFO +1 -1
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/__init__.py +24 -3
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/cli/commands.py +27 -5
- {includecpp-4.6.9 → includecpp-4.7.2}/pyproject.toml +1 -1
- {includecpp-4.6.9 → includecpp-4.7.2}/IncludeCPP.egg-info/SOURCES.txt +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/IncludeCPP.egg-info/dependency_links.txt +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/IncludeCPP.egg-info/entry_points.txt +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/IncludeCPP.egg-info/requires.txt +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/IncludeCPP.egg-info/top_level.txt +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/LICENSE +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/MANIFEST.in +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/README.md +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/CHANGELOG.md +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/DOCUMENTATION.md +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/__init__.pyi +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/__main__.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/cli/__init__.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/cli/config_parser.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/__init__.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/ai_integration.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/build_manager.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cpp_api.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cpp_api.pyi +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cpp_api_extensions.pyi +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cppy_converter.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/CSSL_DOCUMENTATION.md +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/CSSL_DOCUMENTATION_NEW.md +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/__init__.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cpp/build/api.pyd +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cpp/build/cssl_core.pyi +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cpp/build/libgcc_s_seh-1.dll +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cpp/build/libstdc++-6.dll +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cpp/build/libwinpthread-1.dll +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cpp/cssl_core.cp +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cpp/cssl_lexer.hpp +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_builtins.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_builtins.pyi +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_compiler.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_events.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_languages.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_modules.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_optimizer.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_parser.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_runtime.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_syntax.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl/cssl_types.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl_bridge.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/cssl_bridge.pyi +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/error_catalog.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/error_formatter.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/exceptions.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/homeserver.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/path_discovery.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/project_ui.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/core/settings_ui.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/generator/__init__.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/generator/parser.cpp +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/generator/parser.h +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/generator/type_resolver.cpp +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/generator/type_resolver.h +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/py.typed +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/templates/cpp.proj.template +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/__init__.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/__init__.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/extension.js +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/images/cssl.png +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/images/cssl_pl.png +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/language-configuration.json +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/package.json +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/snippets/cssl.snippets.json +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/requirements.txt +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/setup.cfg +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/setup.py +0 -0
- {includecpp-4.6.9 → includecpp-4.7.2}/tests/test_multilang.py +0 -0
|
@@ -5,7 +5,7 @@ import os
|
|
|
5
5
|
import sys
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
__version__ = "4.
|
|
8
|
+
__version__ = "4.7.2"
|
|
9
9
|
__all__ = ["CppApi", "CSSL"]
|
|
10
10
|
|
|
11
11
|
# Module-level cache for C++ modules
|
|
@@ -22,10 +22,31 @@ def _get_frozen_api():
|
|
|
22
22
|
global _frozen_api
|
|
23
23
|
if _frozen_api is None:
|
|
24
24
|
try:
|
|
25
|
+
# In PyInstaller, sys._MEIPASS is the temp extraction directory
|
|
26
|
+
if hasattr(sys, '_MEIPASS'):
|
|
27
|
+
meipass = sys._MEIPASS
|
|
28
|
+
if meipass not in sys.path:
|
|
29
|
+
sys.path.insert(0, meipass)
|
|
30
|
+
|
|
31
|
+
# Try to load api.pyd directly using importlib
|
|
32
|
+
import importlib.util
|
|
33
|
+
ext = '.pyd' if sys.platform == 'win32' else '.so'
|
|
34
|
+
api_path = os.path.join(meipass, f'api{ext}')
|
|
35
|
+
|
|
36
|
+
if os.path.exists(api_path):
|
|
37
|
+
spec = importlib.util.spec_from_file_location('api', api_path)
|
|
38
|
+
if spec and spec.loader:
|
|
39
|
+
api_module = importlib.util.module_from_spec(spec)
|
|
40
|
+
sys.modules['api'] = api_module
|
|
41
|
+
spec.loader.exec_module(api_module)
|
|
42
|
+
_frozen_api = api_module
|
|
43
|
+
return _frozen_api
|
|
44
|
+
|
|
45
|
+
# Fallback to regular import
|
|
25
46
|
import api
|
|
26
47
|
_frozen_api = api
|
|
27
|
-
except
|
|
28
|
-
_frozen_api = False
|
|
48
|
+
except Exception:
|
|
49
|
+
_frozen_api = False
|
|
29
50
|
return _frozen_api if _frozen_api else None
|
|
30
51
|
|
|
31
52
|
def _get_api():
|
|
@@ -554,10 +554,23 @@ def _make_executable(script_path: str, output_name: str = None, onefile: bool =
|
|
|
554
554
|
# Rebuild the modules
|
|
555
555
|
click.echo(" Rebuilding C++ modules...")
|
|
556
556
|
try:
|
|
557
|
-
from ..core.
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
557
|
+
from ..core.build_manager import BuildManager
|
|
558
|
+
from .config_parser import CppProjectConfig
|
|
559
|
+
# detect_compiler is defined in this file
|
|
560
|
+
|
|
561
|
+
config = CppProjectConfig(config_path=cpp_proj_path)
|
|
562
|
+
project_root = cpp_proj_path.parent
|
|
563
|
+
compiler = detect_compiler()
|
|
564
|
+
build_dir_path = config.get_build_dir(compiler)
|
|
565
|
+
build_dir_path.mkdir(parents=True, exist_ok=True)
|
|
566
|
+
|
|
567
|
+
builder = BuildManager(project_root, build_dir_path, config)
|
|
568
|
+
success = builder.rebuild(incremental=True)
|
|
569
|
+
|
|
570
|
+
if success:
|
|
571
|
+
click.secho(" Rebuild complete!", fg='green')
|
|
572
|
+
else:
|
|
573
|
+
click.secho(" Warning: Rebuild had errors", fg='yellow')
|
|
561
574
|
except Exception as e:
|
|
562
575
|
click.secho(f" Warning: Rebuild failed: {e}", fg='yellow')
|
|
563
576
|
|
|
@@ -567,8 +580,15 @@ def _make_executable(script_path: str, output_name: str = None, onefile: bool =
|
|
|
567
580
|
|
|
568
581
|
if build_dir.exists():
|
|
569
582
|
# Find all .pyd files (Windows) or .so files (Linux/Mac)
|
|
583
|
+
# They are in the bindings/ subdirectory
|
|
570
584
|
ext = '.pyd' if sys.platform == 'win32' else '.so'
|
|
571
|
-
|
|
585
|
+
bindings_dir = build_dir / 'bindings'
|
|
586
|
+
|
|
587
|
+
# Search recursively in case structure changes
|
|
588
|
+
pyd_files = list(bindings_dir.glob(f'*{ext}')) if bindings_dir.exists() else []
|
|
589
|
+
if not pyd_files:
|
|
590
|
+
# Fallback: search entire build dir recursively
|
|
591
|
+
pyd_files = list(build_dir.glob(f'**/*{ext}'))
|
|
572
592
|
|
|
573
593
|
for pyd_file in pyd_files:
|
|
574
594
|
click.echo(f" Including: {pyd_file.name}")
|
|
@@ -577,6 +597,8 @@ def _make_executable(script_path: str, output_name: str = None, onefile: bool =
|
|
|
577
597
|
|
|
578
598
|
if pyd_files:
|
|
579
599
|
click.secho(f" Added {len(pyd_files)} compiled module(s)", fg='green')
|
|
600
|
+
else:
|
|
601
|
+
click.secho(" Warning: No compiled modules found in build directory", fg='yellow')
|
|
580
602
|
else:
|
|
581
603
|
click.secho(" Warning: Build directory not found", fg='yellow')
|
|
582
604
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "IncludeCPP"
|
|
7
|
-
version = "4.
|
|
7
|
+
version = "4.7.2"
|
|
8
8
|
description = "Professional C++ Python bindings with type-generic templates, pystubs and native threading"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|