From 7c115a4afc3ba7207e75cfdb3e310d19cb5ee2d1 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 26 May 2012 20:13:31 -0400 Subject: [PATCH] Update pavement. --- README.md | 4 ++-- pavement.py | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 801a1d37..ae9fb91b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Zipline ======= -Zipline is a distributed realtime stream processing system. +Zipline is a realtime stream processing system. System Setup ============== @@ -16,7 +16,7 @@ Initial `virtualenv` setup:: $ mkvirtualenv zipline $ workon zipline # Go get coffee, the following will compile a heap of C/C++ code - $ ./etc/ordered_pip.sh etc/requirements_sci.txt + $ ./etc/ordered_pip.sh etc/requirements_sci.txt $ ./etc/ordered_pip.sh etc/requirements.txt # And optionally: $ ./etc/ordered_pip.sh etc/requirements_dev.txt diff --git a/pavement.py b/pavement.py index 54af3474..0490b25d 100644 --- a/pavement.py +++ b/pavement.py @@ -70,8 +70,8 @@ def parse_requirements(file_name): return requirements example = Extension( - "zipline/example", ["zipline/example.pyx"], - include_dirs=[np.get_include()], + "zipline/speedups/example", ["zipline/speedups/example.pyx"], + #include_dirs=[np.get_include()], ) # ============ @@ -107,6 +107,7 @@ options( package = PACKAGE, only_in_packages = False ), + long_description = DESCRIPTION, install_requires = install_requires, tests_require = tests_require, test_suite = 'nose.collector', @@ -135,16 +136,30 @@ options( # C Extensions # ============ +@task +def clean_inplace(): + """ + Remove shared objects and C files from the extension + directory. + """ + for fn in glob.glob(os.path.join(SRC_PATH, 'speedups', '*.c')): + p = path(fn) + p.remove() + + for fn in glob.glob(os.path.join(SRC_PATH, 'speedups', '*.so')): + p = path(fn) + p.remove() + @task def build_cython(): - for fn in glob.glob(os.path.join(SRC_PATH, '*.pyx')): + for fn in glob.glob(os.path.join(SRC_PATH, 'speedups', '*.pyx')): p = path(fn) modname = p.splitext()[0].basename() dest = p.splitext()[0] + '.c' if newer(p.abspath(), dest.abspath()): - info('cythoning %s to %s'%(p, dest.basename())) + info('cython %s -o %s'%(p, dest.basename())) compile(p.abspath(), full_module_name=modname) @task