From c7ac0496fb8904b7c8506b9e559b3ccb9cfb9b03 Mon Sep 17 00:00:00 2001 From: mhertz Date: Mon, 27 Feb 2023 09:00:23 +0000 Subject: [PATCH] Build tests by default and ensure setup creates appropriate symbolic links for arcticc and arcticdb_ext imports --- setup.cfg | 1 + setup.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index ccc27091c1..6cb30b038e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,6 +9,7 @@ keywords = setup_requires = # Setup dependencies grpcio-tools + wheel install_requires = # Runtime dependencies diff --git a/setup.py b/setup.py index 2390dcf712..8aa8634b24 100644 --- a/setup.py +++ b/setup.py @@ -47,6 +47,11 @@ def compile(self): def compile_protos(): print("\nProtoc compilation") proto_files.compile() + if not os.path.exists("python/arcticc"): + raise RuntimeError("Unable to locate Protobuf module during compilation.") + else: + open("python/arcticc/__init__.py", "a").close() + open("python/arcticc/pb2/__init__.py", "a").close() class CompileProto(Command): @@ -74,6 +79,9 @@ class DevelopAndCompileProto(develop): def run(self): develop.run(self) compile_protos() # compile after updating the deps + if not os.path.islink("python/arcticdb_ext.so") and os.path.exists("python"): + print("Creating symlink for compiled arcticdb module in python...") + os.symlink("../arcticdb_ext.so", "python/arcticdb_ext.so") class CMakeExtension(Extension): @@ -112,7 +120,6 @@ def compile(self, build_dir): } process_args = [ "cmake", - "-DTEST=OFF", "-DCMAKE_DEPENDS_USE_COMPILER=FALSE", "-G", "CodeBlocks - Unix Makefiles",