File: setupscons.py

package info (click to toggle)
python-numpy 1%3A1.4.1-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 12,736 kB
  • ctags: 14,035
  • sloc: ansic: 80,776; python: 62,482; makefile: 183; fortran: 121; f90: 42; cpp: 28; perl: 19; sh: 15
file content (40 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (3)
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
import glob
from os.path import join, split

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration, get_mathlibs
    config = Configuration('random',parent_package,top_path)

    source_files = [join('mtrand', i) for i in ['mtrand.c',
                                                'mtrand.pyx',
                                                'numpy.pxi',
                                                'randomkit.c',
                                                'randomkit.h',
                                                'Python.pxi',
                                                'initarray.c',
                                                'initarray.h',
                                                'distributions.c',
                                                'distributions.h',
                                                ]]
    config.add_sconscript('SConstruct', source_files = source_files)
    config.add_data_files(('.', join('mtrand', 'randomkit.h')))
    config.add_data_dir('tests')

    return config

def testcode_wincrypt():
    return """\
/* check to see if _WIN32 is defined */
int main(int argc, char *argv[])
{
#ifdef _WIN32
    return 0;
#else
    return 1;
#endif
}
"""

if __name__ == '__main__':
    from numpy.distutils.core import setup
    setup(configuration=configuration)