Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2ce8d66
Consumer Example
Behemyth Jul 20, 2025
9d3fffd
Update Examples Test
Behemyth Jul 20, 2025
6ef3b54
Template Name and Version
Behemyth Jul 20, 2025
9284853
Generator Definition Fix
Behemyth Jul 20, 2025
4ccb5ba
Update Example CMake Installation
Behemyth Jul 20, 2025
1797665
Add Missing Publish Sync
Behemyth Jul 20, 2025
37ee620
Update main.cpp
Behemyth Jul 20, 2025
e9b4de0
Update test_conan_cmake.py
Behemyth Jul 20, 2025
08d5b33
CMake Toolchain Sync
Behemyth Jul 22, 2025
aa935bb
Use CMakeToolchain Generator
Behemyth Jul 22, 2025
fa9a136
Update resolution.py
Behemyth Jul 22, 2025
28191be
Remove Fill
Behemyth Jul 22, 2025
3bc2769
Update plugin.py
Behemyth Jul 22, 2025
f758ab4
Update schema.py
Behemyth Jul 22, 2025
87f42b1
Update schema.py
Behemyth Jul 22, 2025
489cfac
Update builder.py
Behemyth Jul 22, 2025
8d2da03
Update Chore
Behemyth Jul 23, 2025
cf1ef5c
Remove Unused Config
Behemyth Jul 23, 2025
c9d585b
Fix Cmake Path Issue
Behemyth Jul 23, 2025
582116c
Fix Toolchain Location
Behemyth Jul 23, 2025
e738ad5
Update settings.json
Behemyth Jul 24, 2025
830828d
Update Chore
Behemyth Jul 26, 2025
5c781a2
Remove Duplicate Test
Behemyth Jul 27, 2025
57c72eb
Revert "Remove Duplicate Test"
Behemyth Jul 27, 2025
464cdb8
Remove Duplicate Test
Behemyth Jul 27, 2025
8985b63
Move Conan Test Example Files
Behemyth Jul 27, 2025
750d51f
Use Subprocess Calls
Behemyth Jul 31, 2025
75ad312
Remove Outdated Tests
Behemyth Aug 2, 2025
cf288b4
Add Presets File Write
Behemyth Aug 2, 2025
3d104ca
Fix Imports
Behemyth Aug 2, 2025
f3dd734
Add Build Presets
Behemyth Aug 2, 2025
b3cb14b
Write Plugin Documentation
Behemyth Aug 2, 2025
15eb1e0
Write Additional Presets
Behemyth Aug 2, 2025
8e43a78
Ignore Lint Errors
Behemyth Aug 2, 2025
0202fe6
Update lib Name
Behemyth Aug 2, 2025
39620fb
Add Log Colouring
Behemyth Aug 2, 2025
ca5e4eb
Remove Profile Handling
Behemyth Aug 2, 2025
2411ee7
Profile Default Fallback
Behemyth Aug 3, 2025
a714544
Presets Instead of Details
Behemyth Aug 5, 2025
3ea5fa6
Update CMake Preset Tests
Behemyth Aug 5, 2025
f162e7e
Update
Behemyth Aug 5, 2025
e213be0
Update plugin.py
Behemyth Aug 5, 2025
b14c5be
Fix Parameter
Behemyth Aug 12, 2025
8956551
Skip Conan Tests
Behemyth Aug 12, 2025
23a068e
Update test_vcpkg_cmake.py
Behemyth Aug 12, 2025
47e5b94
Remove Preset Generation
Behemyth Aug 14, 2025
bd73f82
once again change the cmake sync format sad
Behemyth Aug 14, 2025
d03edb6
Remove Preset Injection
Behemyth Aug 15, 2025
30599c9
Update Chore
Behemyth Aug 15, 2025
fbdb01f
Update schema.py
Behemyth Aug 15, 2025
d39189b
Update plugin.py
Behemyth Aug 15, 2025
0dacefc
Remove Preset Writes
Behemyth Aug 15, 2025
ebfe39c
Update plugin.py
Behemyth Aug 15, 2025
9917874
Relative `binaryDir`
Behemyth Aug 16, 2025
a4bec4b
Add Description Slots
Behemyth Aug 16, 2025
8159b1a
Use Conan Toolchain Location
Behemyth Aug 16, 2025
521e15e
Update Default Presets
Behemyth Aug 16, 2025
bebd85d
Remove CPPython Preset Includes
Behemyth Aug 16, 2025
1b167e4
Move to src directory
Behemyth Aug 16, 2025
ec79e2b
Remove OF
Behemyth Aug 16, 2025
a60fd82
Fix Sources
Behemyth Aug 16, 2025
184d9fd
Update Conanfile
Behemyth Aug 16, 2025
815ec8c
Update `vcpkg` Subprocess Logging
Behemyth Aug 16, 2025
2a0f06c
Update test_vcpkg_cmake.py
Behemyth Aug 16, 2025
de30a25
Fix Tests
Behemyth Aug 16, 2025
a92ff62
Exclude Linting Examples
Behemyth Aug 16, 2025
5a14bf3
Remove Outdated Type Ignores
Behemyth Aug 17, 2025
aa20943
Add Debug Log
Behemyth Aug 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "charliermarsh.ruff"
}
},
"cmake.ignoreCMakeListsMissing": true
}
31 changes: 29 additions & 2 deletions cppython/builder.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
"""Defines the data and routines for building a CPPython project type"""

import logging
import os
from importlib.metadata import entry_points
from inspect import getmodule
from logging import Logger
from pprint import pformat
from typing import Any, cast

from rich.console import Console
from rich.logging import RichHandler

from cppython.core.plugin_schema.generator import Generator
from cppython.core.plugin_schema.provider import Provider
from cppython.core.plugin_schema.scm import SCM, SupportedSCMFeatures
Expand Down Expand Up @@ -471,8 +476,28 @@ def __init__(self, project_configuration: ProjectConfiguration, logger: Logger)
self._project_configuration = project_configuration
self._logger = logger

# Add default output stream
self._logger.addHandler(logging.StreamHandler())
# Informal standard to check for color
force_color = os.getenv('FORCE_COLOR', '1') != '0'

console = Console(
force_terminal=force_color,
color_system='auto',
width=120,
legacy_windows=False,
no_color=False,
)

rich_handler = RichHandler(
console=console,
rich_tracebacks=True,
show_time=False,
show_path=False,
markup=True,
show_level=False,
enable_link_path=False,
)

self._logger.addHandler(rich_handler)
self._logger.setLevel(Builder.levels[project_configuration.verbosity])

self._logger.info('Logging setup complete')
Expand Down Expand Up @@ -532,4 +557,6 @@ def build(

plugins = Plugins(generator=generator, provider=provider, scm=scm)

self._logger.debug('Project data:\n%s', pformat(dict(core_data)))

return Data(core_data, plugins, self._logger)
4 changes: 2 additions & 2 deletions cppython/core/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ProjectConfiguration(CPPythonModel, extra='forbid'):
bool, Field(description='Debug mode. Additional processing will happen to expose more debug information')
] = False

@field_validator('verbosity') # type: ignore
@field_validator('verbosity')
@classmethod
def min_max(cls, value: int) -> int:
"""Validator that clamps the input value
Expand Down Expand Up @@ -121,7 +121,7 @@ class CPPythonData(CPPythonModel, extra='forbid'):
provider_data: Annotated[dict[str, Any], Field(description='Resolved provider configuration data')]
generator_data: Annotated[dict[str, Any], Field(description='Resolved generator configuration data')]

@field_validator('configuration_path', 'install_path', 'tool_path', 'build_path') # type: ignore
@field_validator('configuration_path', 'install_path', 'tool_path', 'build_path')
@classmethod
def validate_absolute_path(cls, value: Path) -> Path:
"""Enforce the input is an absolute path
Expand Down
Loading
Loading