Skip to content

Commit b964659

Browse files
gnikitawvwgk
andauthored
feat: add preprocessor to schema (#4)
Co-authored-by: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com>
1 parent 5792c95 commit b964659

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/fpm/metadata/models.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,23 @@ class Install(BaseModel):
227227
"""Install library with this project"""
228228

229229

230+
class Preprocess(BaseModel):
231+
"""
232+
.. Preprocessing settings
233+
234+
Preprocessing directives for the project.
235+
"""
236+
237+
macros: Union[str, List[str]] = []
238+
"""Preprocessor macros e.g. ['HAVE_MPI', 'VALUE=1', 'VERSION={version}']"""
239+
240+
directories: Union[str, List[str]] = []
241+
"""Include directories"""
242+
243+
suffixes: Union[str, List[str]]= []
244+
"""Suffixes the preprocessor should run on"""
245+
246+
230247
class Manifest(BaseModel):
231248
"""
232249
.. Package manifest settings
@@ -285,6 +302,9 @@ class Manifest(BaseModel):
285302

286303
dev_dependencies: Dict[str, DependencyUnion] = Field({}, alias="dev-dependencies")
287304
"""Development dependency meta data"""
305+
306+
preprocess: Dict[str, Preprocess] = {}
307+
"""Preprocessor meta data"""
288308

289309
extra: Dict[str, Any] = {}
290310
"""Additional free data field"""

0 commit comments

Comments
 (0)