Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build tests by default and ensure python setup.py develop works #1

Merged
merged 1 commit into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ keywords =
setup_requires =
# Setup dependencies
grpcio-tools
wheel

install_requires =
# Runtime dependencies
Expand Down
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -112,7 +120,6 @@ def compile(self, build_dir):
}
process_args = [
"cmake",
"-DTEST=OFF",
"-DCMAKE_DEPENDS_USE_COMPILER=FALSE",
"-G",
"CodeBlocks - Unix Makefiles",
Expand Down