IncludeCPP 2.1.2__tar.gz → 2.2.0__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.
Files changed (48) hide show
  1. {includecpp-2.1.2 → includecpp-2.2.0}/IncludeCPP.egg-info/PKG-INFO +2 -2
  2. {includecpp-2.1.2 → includecpp-2.2.0}/PKG-INFO +2 -2
  3. {includecpp-2.1.2 → includecpp-2.2.0}/README.md +1 -1
  4. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/__init__.py +1 -1
  5. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/cli/commands.py +52 -0
  6. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/core/build_manager.py +45 -1
  7. {includecpp-2.1.2 → includecpp-2.2.0}/pyproject.toml +1 -1
  8. {includecpp-2.1.2 → includecpp-2.2.0}/setup.py +1 -1
  9. {includecpp-2.1.2 → includecpp-2.2.0}/IncludeCPP.egg-info/SOURCES.txt +0 -0
  10. {includecpp-2.1.2 → includecpp-2.2.0}/IncludeCPP.egg-info/dependency_links.txt +0 -0
  11. {includecpp-2.1.2 → includecpp-2.2.0}/IncludeCPP.egg-info/entry_points.txt +0 -0
  12. {includecpp-2.1.2 → includecpp-2.2.0}/IncludeCPP.egg-info/requires.txt +0 -0
  13. {includecpp-2.1.2 → includecpp-2.2.0}/IncludeCPP.egg-info/top_level.txt +0 -0
  14. {includecpp-2.1.2 → includecpp-2.2.0}/LICENSE +0 -0
  15. {includecpp-2.1.2 → includecpp-2.2.0}/MANIFEST.in +0 -0
  16. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/__init__.pyi +0 -0
  17. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/__main__.py +0 -0
  18. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/cli/__init__.py +0 -0
  19. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/cli/config_parser.py +0 -0
  20. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/core/__init__.py +0 -0
  21. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/core/cpp_api.py +0 -0
  22. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/core/cpp_api.pyi +0 -0
  23. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/core/error_formatter.py +0 -0
  24. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/core/exceptions.py +0 -0
  25. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/generator/__init__.py +0 -0
  26. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/generator/parser.cpp +0 -0
  27. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/generator/parser.h +0 -0
  28. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/generator/type_resolver.cpp +0 -0
  29. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/generator/type_resolver.h +0 -0
  30. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/__init__.py +0 -0
  31. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/crypto/crypto.cp +0 -0
  32. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/crypto/crypto.cpp +0 -0
  33. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/crypto/crypto.h +0 -0
  34. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/filesystem/filesystem.cp +0 -0
  35. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/filesystem/filesystem.cpp +0 -0
  36. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/filesystem/filesystem.h +0 -0
  37. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/json/json_parser.cp +0 -0
  38. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/json/json_parser.cpp +0 -0
  39. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/json/json_parser.h +0 -0
  40. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/networking/networking.cp +0 -0
  41. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/networking/networking.cpp +0 -0
  42. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/networking/networking.h +0 -0
  43. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/string_utils/string_utils.cp +0 -0
  44. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/string_utils/string_utils.cpp +0 -0
  45. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/inbuilds/string_utils/string_utils.h +0 -0
  46. {includecpp-2.1.2 → includecpp-2.2.0}/includecpp/templates/cpp.proj.template +0 -0
  47. {includecpp-2.1.2 → includecpp-2.2.0}/requirements.txt +0 -0
  48. {includecpp-2.1.2 → includecpp-2.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 2.1.2
3
+ Version: 2.2.0
4
4
  Summary: Professional C++ Python bindings with type-generic templates and native threading
5
5
  Home-page: https://github.com/includecpp/includecpp
6
6
  Author: IncludeCPP Team
@@ -351,6 +351,6 @@ Dynamic: requires-python
351
351
  ---
352
352
 
353
353
  **License:** MIT
354
- **Version:** 2.1.2
354
+ **Version:** 2.1.3
355
355
  **Status:** Production Ready
356
356
  **Repository:** https://github.com/liliassg/IncludeCPP
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 2.1.2
3
+ Version: 2.2.0
4
4
  Summary: Professional C++ Python bindings with type-generic templates and native threading
5
5
  Home-page: https://github.com/includecpp/includecpp
6
6
  Author: IncludeCPP Team
@@ -351,6 +351,6 @@ Dynamic: requires-python
351
351
  ---
352
352
 
353
353
  **License:** MIT
354
- **Version:** 2.1.2
354
+ **Version:** 2.1.3
355
355
  **Status:** Production Ready
356
356
  **Repository:** https://github.com/liliassg/IncludeCPP
@@ -315,6 +315,6 @@
315
315
  ---
316
316
 
317
317
  **License:** MIT
318
- **Version:** 2.1.2
318
+ **Version:** 2.1.3
319
319
  **Status:** Production Ready
320
320
  **Repository:** https://github.com/liliassg/IncludeCPP
@@ -1,4 +1,4 @@
1
1
  from .core.cpp_api import CppApi
2
2
 
3
- __version__ = "1.1.0"
3
+ __version__ = "2.1.3"
4
4
  __all__ = ["CppApi"]
@@ -440,6 +440,58 @@ def install(module_name):
440
440
  click.echo("Run 'python -m includecpp rebuild' to build the module.")
441
441
  click.echo("=" * 60)
442
442
 
443
+ @cli.command()
444
+ def update():
445
+ """Update IncludeCPP package to latest version from PyPI."""
446
+ import subprocess
447
+ import urllib.request
448
+ import json
449
+
450
+ click.echo("=" * 60)
451
+ click.secho("Checking for IncludeCPP updates", fg='cyan', bold=True)
452
+ click.echo("=" * 60)
453
+ click.echo()
454
+
455
+ try:
456
+ click.echo(" Fetching latest version from PyPI...", nl=False)
457
+ with urllib.request.urlopen("https://pypi.org/pypi/IncludeCPP/json") as response:
458
+ data = json.loads(response.read())
459
+ latest_version = data['info']['version']
460
+ click.secho(f" OK", fg='green')
461
+
462
+ from .. import __version__ as current_version
463
+ click.echo()
464
+ click.echo(f" Current version: {current_version}")
465
+ click.echo(f" Latest version: {latest_version}")
466
+ click.echo()
467
+
468
+ if current_version == latest_version:
469
+ click.secho("IncludeCPP is already up to date!", fg='green', bold=True)
470
+ click.echo("=" * 60)
471
+ return
472
+
473
+ click.secho(f"Upgrading to version {latest_version}...", fg='cyan', bold=True)
474
+ click.echo()
475
+
476
+ result = subprocess.run(
477
+ [sys.executable, "-m", "pip", "install", "--upgrade", "IncludeCPP"],
478
+ capture_output=True,
479
+ text=True
480
+ )
481
+
482
+ if result.returncode == 0:
483
+ click.echo()
484
+ click.secho(f"Successfully upgraded to IncludeCPP {latest_version}!", fg='green', bold=True)
485
+ click.echo("Restart your terminal to use the new version.")
486
+ else:
487
+ click.secho("Upgrade failed!", fg='red', err=True, bold=True)
488
+ click.echo(result.stderr)
489
+
490
+ except Exception as e:
491
+ click.secho(f"Failed to check for updates: {e}", fg='red', err=True)
492
+
493
+ click.echo("=" * 60)
494
+
443
495
  @cli.command()
444
496
  @click.argument('plugin_name')
445
497
  @click.argument('files', nargs=-1, required=True)
@@ -1047,6 +1047,48 @@ endif()
1047
1047
  if verbose:
1048
1048
  print(f"Generated type stub: {pyi_file}")
1049
1049
 
1050
+ def _update_source_hashes(self, verbose: bool = False):
1051
+ """Update source_hashes in registry after successful build."""
1052
+ if not self.registry_file.exists():
1053
+ if verbose:
1054
+ print("No registry file found, skipping hash update")
1055
+ return
1056
+
1057
+ try:
1058
+ with open(self.registry_file, 'r') as f:
1059
+ registry = json.load(f)
1060
+ except Exception as e:
1061
+ if verbose:
1062
+ print(f"Failed to load registry for hash update: {e}")
1063
+ return
1064
+
1065
+ modules = registry.get('modules', registry)
1066
+
1067
+ for module_name, module_info in modules.items():
1068
+ sources = module_info.get('sources', [])
1069
+ source_hashes = {}
1070
+
1071
+ for source in sources:
1072
+ source_path = self.project_root / source
1073
+ hash_value = self._compute_hash(source_path)
1074
+ source_hashes[source] = hash_value
1075
+
1076
+ module_info['source_hashes'] = source_hashes
1077
+
1078
+ if 'modules' in registry:
1079
+ registry['modules'] = modules
1080
+ else:
1081
+ registry = modules
1082
+
1083
+ try:
1084
+ with open(self.registry_file, 'w') as f:
1085
+ json.dump(registry, f, indent=2)
1086
+ if verbose:
1087
+ print(f"Updated source hashes in registry")
1088
+ except Exception as e:
1089
+ if verbose:
1090
+ print(f"Failed to save registry with hashes: {e}")
1091
+
1050
1092
  def _cpp_to_python_type(self, cpp_type: str) -> str:
1051
1093
  """Convert C++ type to Python type hint."""
1052
1094
  # Basic type mappings
@@ -1507,7 +1549,9 @@ endif()
1507
1549
  except Exception as e:
1508
1550
  if verbose:
1509
1551
  print(f"Warning: .pyi generation failed: {e}")
1510
- # Don't fail build if .pyi generation fails
1552
+
1553
+ # Phase 5: Update registry with source hashes for incremental builds
1554
+ self._update_source_hashes(verbose=verbose)
1511
1555
 
1512
1556
  if verbose:
1513
1557
  print(f"\n{'='*60}")
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "IncludeCPP"
7
- version = "2.1.2"
7
+ version = "2.2.0"
8
8
  description = "Professional C++ Python bindings with type-generic templates and native threading"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text(encoding="utf-8")
6
6
 
7
7
  setup(
8
8
  name="IncludeCPP",
9
- version="2.1.2",
9
+ version="2.1.3",
10
10
  author="IncludeCPP Team",
11
11
  author_email="contact@includecpp.dev",
12
12
  description="Professional C++ Python bindings with type-generic templates and native threading",
File without changes
File without changes
File without changes
File without changes