2010-09-08 23:45:22 +08:00
|
|
|
from os.path import join
|
|
|
|
|
import warnings
|
|
|
|
|
import numpy
|
|
|
|
|
import sys
|
2010-12-07 19:44:42 +08:00
|
|
|
|
2010-09-08 23:45:22 +08:00
|
|
|
|
|
|
|
|
def configuration(parent_package='', top_path=None):
|
|
|
|
|
from numpy.distutils.misc_util import Configuration
|
|
|
|
|
from numpy.distutils.system_info import get_info
|
|
|
|
|
from numpy.distutils.system_info import get_standard_file
|
|
|
|
|
from numpy.distutils.system_info import BlasNotFoundError
|
|
|
|
|
|
2010-10-05 19:23:06 +08:00
|
|
|
config = Configuration('sparse', parent_package, top_path)
|
2010-09-08 23:45:22 +08:00
|
|
|
|
2010-09-08 23:56:53 +08:00
|
|
|
config.add_extension('cd_fast_sparse',
|
|
|
|
|
sources=[join('src', 'cd_fast_sparse.c')],
|
2010-10-05 19:23:06 +08:00
|
|
|
include_dirs=[numpy.get_include()]
|
|
|
|
|
)
|
2010-09-08 23:45:22 +08:00
|
|
|
|
|
|
|
|
# add other directories
|
|
|
|
|
config.add_subpackage('tests')
|
|
|
|
|
return config
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
from numpy.distutils.core import setup
|
|
|
|
|
setup(**configuration(top_path='').todict())
|