From b96122f3557b7590b5ff196b96d03f287ea94541 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Wed, 22 Aug 2012 13:57:09 -0400 Subject: [PATCH] Removes unused wiring for speedups. Separating this deletion into it's own patch, so that it can be used as a base to add C extensions back in, if we end up going that route. --- pavement.py | 73 +----------------------------------- zipline/speedups/__init__.py | 0 zipline/speedups/example.pyx | 3 -- 3 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 zipline/speedups/__init__.py delete mode 100644 zipline/speedups/example.pyx diff --git a/pavement.py b/pavement.py index d4b4bd7a..5353c8a3 100644 --- a/pavement.py +++ b/pavement.py @@ -1,36 +1,14 @@ import os import re import sys -import glob import time -from distutils.dep_util import newer -#from distutils.extension import Extension -from setuptools.extension import Extension - -from paver.easy import options, Bunch, task, needs, path, info +from paver.easy import options, Bunch, task, path from paver.setuputils import install_distutils_tasks, \ find_packages, find_package_data from subprocess import call install_distutils_tasks() -# ========= -# Compilers -# ========= - -try: - from Cython.Compiler.Main import compile - from Cython.Distutils import build_ext - have_cython = True -except ImportError: - have_cython = False - -try: - import numpy as np - have_numpy = True -except: - have_numpy = False - # =================== # Release Information # =================== @@ -69,11 +47,6 @@ def parse_requirements(file_name): requirements.append(line) return requirements -example = Extension( - "zipline/speedups/example", ["zipline/speedups/example.pyx"], - #include_dirs=[np.get_include()], -) - # ============ # Dependencies # ============ @@ -88,11 +61,6 @@ tests_require = install_requires + parse_requirements('./etc/requirements_dev.tx # seutp.py # ======== -if have_numpy and have_cython: - cext = [example] -else: - cext = [] - options( sphinx = Bunch( builddir="_build", @@ -127,10 +95,6 @@ options( 'Topic :: Scientific/Engineering :: Information Analysis', 'Topic :: System :: Distributed Computing', ], - ext_modules = cext, - cmdclass = { - 'build_ext': build_ext - }, entry_points = { 'console_scripts': [ 'zipline = zipline.core.interpreter:main', @@ -139,41 +103,6 @@ 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, 'speedups', '*.pyx')): - p = path(fn) - - modname = p.splitext()[0].basename() - dest = p.splitext()[0] + '.c' - - if newer(p.abspath(), dest.abspath()): - info('cython %s -o %s'%(p, dest.basename())) - compile(p.abspath(), full_module_name=modname) - -@task -@needs(['build_cython', 'setuptools.command.build_ext']) -def build_ext(): - pass - # ====== # Tasks # ====== diff --git a/zipline/speedups/__init__.py b/zipline/speedups/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/zipline/speedups/example.pyx b/zipline/speedups/example.pyx deleted file mode 100644 index befd4ae7..00000000 --- a/zipline/speedups/example.pyx +++ /dev/null @@ -1,3 +0,0 @@ -from libc.stdio cimport printf - -printf("Hello World!")