forked from scikit-image/scikit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (37 loc) · 1.45 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import os
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('skimage', parent_package, top_path)
config.add_subpackage('_shared')
config.add_subpackage('color')
config.add_subpackage('data')
config.add_subpackage('draw')
config.add_subpackage('exposure')
config.add_subpackage('feature')
config.add_subpackage('restoration')
config.add_subpackage('filters')
config.add_subpackage('future')
config.add_subpackage('graph')
config.add_subpackage('io')
config.add_subpackage('measure')
config.add_subpackage('morphology')
config.add_subpackage('transform')
config.add_subpackage('util')
config.add_subpackage('segmentation')
config.add_subpackage('external')
def add_test_directories(arg, dirname, fnames):
if dirname.split(os.path.sep)[-1] == 'tests':
config.add_data_dir(dirname)
# Add test directories
from os.path import isdir, dirname, join
rel_isdir = lambda d: isdir(join(curpath, d))
curpath = join(dirname(__file__), './')
subdirs = [join(d, 'tests') for d in os.listdir(curpath) if rel_isdir(d)]
subdirs = [d for d in subdirs if rel_isdir(d)]
for test_dir in subdirs:
config.add_data_dir(test_dir)
return config
if __name__ == "__main__":
from numpy.distutils.core import setup
config = configuration(top_path='').todict()
setup(**config)