Skip to content
16 changes: 10 additions & 6 deletions cppython/plugins/generator/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ class CMakeGenerator(Generator):
"""

def __init__(self, pyproject: PyProject, cmake_data: CMakeData) -> None:
"""
TODO
"""
self.data = cmake_data

@staticmethod
def name() -> str:
Expand All @@ -36,13 +34,19 @@ def data_type() -> Type[GeneratorData]:
"""
return CMakeData

def downloaded(self) -> bool:
def generator_downloaded(self) -> bool:

# CMake tooling is a part of the python package tooling
return True

def download(self) -> None:
def download_generator(self) -> None:
"""
Installs the external tooling required by the generator if necessary
Returns whether anything was installed or not
"""

def update_generator(self) -> None:
"""
Update the tooling required by the generator
"""

def install(self) -> None:
Expand Down
17 changes: 15 additions & 2 deletions cppython/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ class Generator(Plugin, API):
Abstract type to be inherited by CPPython Generator plugins
"""

@abstractmethod
def __init__(self, pyproject: PyProject, generator_data: GeneratorData) -> None:
"""
Allows CPPython to pass the relevant data to constructed Generator plugin
"""

@staticmethod
def plugin_group() -> str:
"""
Expand All @@ -169,15 +175,22 @@ def data_type() -> Type[GeneratorData]:
raise NotImplementedError()

@abstractmethod
def downloaded(self) -> bool:
def generator_downloaded(self) -> bool:
"""
Returns whether the generator needs to be downloaded
"""
raise NotImplementedError()

@abstractmethod
def download(self) -> None:
def download_generator(self) -> None:
"""
Installs the external tooling required by the generator
"""
raise NotImplementedError()

@abstractmethod
def update_generator(self) -> None:
"""
Update the tooling required by the generator
"""
raise NotImplementedError()
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
description = " A Python package manager agnostic plugin integrating a transparent Conan and CMake workflow."
name = "cppython"

license = "MIT"
license-expression = "MIT"

authors = [
"Synodic Software",
{name = "Synodic Software", email = "contact@synodic.software"},
]

readme = "README.md"

homepage = "https://github.com/Synodic-Software/CPPython"
repository = "https://github.com/Synodic-Software/CPPython"

dynamic = ["version"]

requires-python = ">=3.10"
Expand All @@ -25,6 +21,13 @@ dependencies = [
"pytest>=7.0.0", # Required for testing injection
]

[project.license-files]
paths = ["LICENSE.md"]

[project.urls]
homepage = "https://github.com/Synodic-Software/CPPython"
repository = "https://github.com/Synodic-Software/CPPython"

[tool.pdm]
version = {use_scm = true}

Expand Down