Update pavement.

This commit is contained in:
Stephen Diehl
2012-05-26 20:13:31 -04:00
parent 318d7ba678
commit 7c115a4afc
2 changed files with 21 additions and 6 deletions
+2 -2
View File
@@ -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
+19 -4
View File
@@ -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