2010-01-05 21:35:09 +08:00
|
|
|
|
2011-06-10 23:20:34 +08:00
|
|
|
import numpy
|
2011-09-14 23:41:43 +08:00
|
|
|
import os
|
2018-07-20 12:39:53 +08:00
|
|
|
import platform
|
2011-03-20 01:04:29 +08:00
|
|
|
|
2011-11-21 04:16:52 +08:00
|
|
|
|
2011-03-20 01:04:29 +08:00
|
|
|
def configuration(parent_package='', top_path=None):
|
2010-01-05 21:35:09 +08:00
|
|
|
from numpy.distutils.misc_util import Configuration
|
2011-03-20 01:04:29 +08:00
|
|
|
config = Configuration('datasets', parent_package, top_path)
|
2010-03-19 17:31:18 +08:00
|
|
|
config.add_data_dir('data')
|
|
|
|
|
config.add_data_dir('descr')
|
2011-08-23 08:24:31 +08:00
|
|
|
config.add_data_dir('images')
|
2011-09-14 23:41:43 +08:00
|
|
|
config.add_data_dir(os.path.join('tests', 'data'))
|
2018-07-20 12:39:53 +08:00
|
|
|
if platform.python_implementation() != 'PyPy':
|
2019-10-28 05:17:23 +08:00
|
|
|
config.add_extension('_svmlight_format_fast',
|
|
|
|
|
sources=['_svmlight_format_fast.pyx'],
|
2018-07-20 12:39:53 +08:00
|
|
|
include_dirs=[numpy.get_include()])
|
2016-02-04 02:39:50 +08:00
|
|
|
config.add_subpackage('tests')
|
2010-01-05 21:35:09 +08:00
|
|
|
return config
|
|
|
|
|
|
2011-03-20 01:04:29 +08:00
|
|
|
|
2010-01-05 21:35:09 +08:00
|
|
|
if __name__ == '__main__':
|
2010-05-06 15:10:42 +08:00
|
|
|
from numpy.distutils.core import setup
|
|
|
|
|
setup(**configuration(top_path='').todict())
|