initial orchestra commit

This commit is contained in:
Philipp Moritz
2016-02-07 15:50:02 -08:00
parent 3655dfbc23
commit 5d51bd1bfa
8 changed files with 262 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
from .context import Context
+14
View File
@@ -0,0 +1,14 @@
cdef extern void* orch_create_context(const char* server_addr);
cdef extern size_t orch_remote_call(void* context, const char* name, void* args);
cdef class Context:
cdef void* context
def __cinit__(self):
self.context = NULL
def connect(self, server_addr):
self.context = orch_create_context(server_addr)
def call(self, name):
orch_remote_call(self.context, name, <void*>0)
+16
View File
@@ -0,0 +1,16 @@
from setuptools import setup, Extension, find_packages
from Cython.Build import cythonize
# because of relative paths, this must be run from inside orch/lib/orchpy/
setup(
name = "orchestra",
version = "0.1.dev0",
ext_modules = cythonize([
Extension("orchpy/context",
sources = ["orchpy/context.pyx"], libraries=["orchlib"],
library_dirs=['../orchlib/'])],
compiler_directives={'language_level': 3}),
use_2to3=True,
packages=find_packages()
)