Skip to content

Commit 03b93bd

Browse files
authored
Update Metadata + Update Generator Requirement (#28)
1 parent 10962c7 commit 03b93bd

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

cppython/plugins/generator/cmake.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ class CMakeGenerator(Generator):
1818
"""
1919

2020
def __init__(self, pyproject: PyProject, cmake_data: CMakeData) -> None:
21-
"""
22-
TODO
23-
"""
21+
self.data = cmake_data
2422

2523
@staticmethod
2624
def name() -> str:
@@ -36,13 +34,19 @@ def data_type() -> Type[GeneratorData]:
3634
"""
3735
return CMakeData
3836

39-
def downloaded(self) -> bool:
37+
def generator_downloaded(self) -> bool:
38+
39+
# CMake tooling is a part of the python package tooling
4040
return True
4141

42-
def download(self) -> None:
42+
def download_generator(self) -> None:
4343
"""
4444
Installs the external tooling required by the generator if necessary
45-
Returns whether anything was installed or not
45+
"""
46+
47+
def update_generator(self) -> None:
48+
"""
49+
Update the tooling required by the generator
4650
"""
4751

4852
def install(self) -> None:

cppython/schema.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ class Generator(Plugin, API):
145145
Abstract type to be inherited by CPPython Generator plugins
146146
"""
147147

148+
@abstractmethod
149+
def __init__(self, pyproject: PyProject, generator_data: GeneratorData) -> None:
150+
"""
151+
Allows CPPython to pass the relevant data to constructed Generator plugin
152+
"""
153+
148154
@staticmethod
149155
def plugin_group() -> str:
150156
"""
@@ -169,15 +175,22 @@ def data_type() -> Type[GeneratorData]:
169175
raise NotImplementedError()
170176

171177
@abstractmethod
172-
def downloaded(self) -> bool:
178+
def generator_downloaded(self) -> bool:
173179
"""
174180
Returns whether the generator needs to be downloaded
175181
"""
176182
raise NotImplementedError()
177183

178184
@abstractmethod
179-
def download(self) -> None:
185+
def download_generator(self) -> None:
180186
"""
181187
Installs the external tooling required by the generator
182188
"""
183189
raise NotImplementedError()
190+
191+
@abstractmethod
192+
def update_generator(self) -> None:
193+
"""
194+
Update the tooling required by the generator
195+
"""
196+
raise NotImplementedError()

pyproject.toml

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
description = " A Python package manager agnostic plugin integrating a transparent Conan and CMake workflow."
33
name = "cppython"
44

5-
license = "MIT"
5+
license-expression = "MIT"
66

77
authors = [
8-
"Synodic Software",
8+
{name = "Synodic Software", email = "[email protected]"},
99
]
10-
1110
readme = "README.md"
1211

13-
homepage = "https://github.com/Synodic-Software/CPPython"
14-
repository = "https://github.com/Synodic-Software/CPPython"
15-
1612
dynamic = ["version"]
1713

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

24+
[project.license-files]
25+
paths = ["LICENSE.md"]
26+
27+
[project.urls]
28+
homepage = "https://github.com/Synodic-Software/CPPython"
29+
repository = "https://github.com/Synodic-Software/CPPython"
30+
2831
[tool.pdm]
2932
version = {use_scm = true}
3033

0 commit comments

Comments
 (0)