Skip to content
Snippets Groups Projects
Commit 0c969d12 authored by Fabian Pedregosa's avatar Fabian Pedregosa
Browse files

Revert "RF: build Cython code during build time"

I'm reverting this patch because it breaks the build on some systems.

This reverts commit ad7a81f0.

git-svn-id: https://scikit-learn.svn.sourceforge.net/svnroot/scikit-learn/trunk@627 22fbfee3-77ab-4535-9bad-27d1bd3bc7d8
parent a5087aae
Branches
Tags
No related merge requests found
...@@ -10,10 +10,10 @@ def configuration(parent_package='', top_path=None): ...@@ -10,10 +10,10 @@ def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration from numpy.distutils.misc_util import Configuration
config = Configuration('glm',parent_package,top_path) config = Configuration('glm',parent_package,top_path)
config.add_extension('lasso_cd_fast', config.add_extension('lasso_cd_fast',
sources=[join('src', 'lasso_cd_fast.pyx')], sources=['src/lasso_cd_fast.c'],
include_dirs=[numpy.get_include()]) include_dirs=[numpy.get_include()])
config.add_extension('enet_cd_fast', config.add_extension('enet_cd_fast',
sources=[join('src', 'enet_cd_fast.pyx')], sources=['src/enet_cd_fast.c'],
include_dirs=[numpy.get_include()]) include_dirs=[numpy.get_include()])
return config return config
......
from os.path import join from os.path import join
import numpy import numpy
# Workaround to enforce building cython extensions while
# maintaining compatibility with NumPy
# Found at http://old.nabble.com/problem-with-numpy.distutils-and-Cython-td25100957.html
# Introduced here by Yaroslav Halchenko <debian@onerussian.com> 2010-04-06
from numpy.distutils.command import build_src
import Cython
import Cython.Compiler.Main
build_src.Pyrex = Cython
build_src.have_pyrex = True
def configuration(parent_package='',top_path=None): def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration from numpy.distutils.misc_util import Configuration
config = Configuration('learn',parent_package,top_path) config = Configuration('learn',parent_package,top_path)
...@@ -25,10 +14,9 @@ def configuration(parent_package='',top_path=None): ...@@ -25,10 +14,9 @@ def configuration(parent_package='',top_path=None):
define_macros=[('LIBSVM_EXPORTS', None), define_macros=[('LIBSVM_EXPORTS', None),
('LIBSVM_DLL', None)], ('LIBSVM_DLL', None)],
sources=[join('src', 'svm.cpp'), sources=[join('src', 'svm.cpp'),
join('src', 'libsvm.pyx'), join('src', 'libsvm.c'),
], ],
include_dirs=[numpy.get_include(), include_dirs=[numpy.get_include()],
join('scikits', 'learn', 'src')],
depends=[join('src', 'svm.h'), depends=[join('src', 'svm.h'),
join('src', 'libsvm_helper.c'), join('src', 'libsvm_helper.c'),
]) ])
......
setup.py 100755 → 100644
...@@ -23,16 +23,6 @@ VERSION = '0.3-SVN' ...@@ -23,16 +23,6 @@ VERSION = '0.3-SVN'
import setuptools # we are using a setuptools namespace import setuptools # we are using a setuptools namespace
from numpy.distutils.core import setup from numpy.distutils.core import setup
# Workaround to enforce building cython extensions while
# maintaining compatibility with NumPy
# Found at http://old.nabble.com/problem-with-numpy.distutils-and-Cython-td25100957.html
# Introduced here by Yaroslav Halchenko <debian@onerussian.com> 2010-04-06
from numpy.distutils.command import build_src
import Cython
import Cython.Compiler.Main
build_src.Pyrex = Cython
build_src.have_pyrex = True
def configuration(parent_package='',top_path=None): def configuration(parent_package='',top_path=None):
if os.path.exists('MANIFEST'): os.remove('MANIFEST') if os.path.exists('MANIFEST'): os.remove('MANIFEST')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment