From 1195cf5369275920dcdb92357d4c10bd45f923bd Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Tue, 19 Dec 2023 13:28:35 -0800 Subject: [PATCH] only build stubs with extras --- SConscript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SConscript b/SConscript index 155f111..1a7d9f5 100644 --- a/SConscript +++ b/SConscript @@ -14,9 +14,10 @@ env.Command([f'gen/cpp/{s}.c++' for s in schema_files] + [f'gen/cpp/{s}.h' for s schema_files, f"capnpc --src-prefix={cereal_dir.path} $SOURCES -o c++:{gen_dir.path}/cpp/") -env.Command([f'gen/py/{s}_capnp.pyi' for s in schema_files] + [f'gen/py/{s}_capnp.py' for s in schema_files], - schema_files, - f"capnp-stub-generator -p '{cereal_dir.path}/*.capnp' -c '{cereal_dir.path}/*_capnp.pyi' '{cereal_dir.path}/*_capnp.py' -o {cereal_dir.path}/gen/py/") +if GetOption('extras'): + env.Command([f'gen/py/{s}_capnp.pyi' for s in schema_files] + [f'gen/py/{s}_capnp.py' for s in schema_files], + schema_files, + f"capnp-stub-generator -p '{cereal_dir.path}/*.capnp' -c '{cereal_dir.path}/*_capnp.pyi' '{cereal_dir.path}/*_capnp.py' -o {cereal_dir.path}/gen/py/") # TODO: remove non shared cereal and messaging cereal_objects = env.SharedObject([f'gen/cpp/{s}.c++' for s in schema_files])