diff --git a/cppython/plugins/generator/cmake.py b/cppython/plugins/generator/cmake.py index b7300ce..3f708c9 100644 --- a/cppython/plugins/generator/cmake.py +++ b/cppython/plugins/generator/cmake.py @@ -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: @@ -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: diff --git a/cppython/schema.py b/cppython/schema.py index 388800a..6c777bc 100644 --- a/cppython/schema.py +++ b/cppython/schema.py @@ -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: """ @@ -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() diff --git a/pyproject.toml b/pyproject.toml index de30104..a8d599a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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}