Python numpy.distutils.misc_util.Configuration() Examples

The following are code examples for showing how to use numpy.distutils.misc_util.Configuration(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('_lib', parent_package, top_path)
    config.add_data_files('tests/*.py')

    include_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
    depends = [os.path.join(include_dir, 'ccallback.h')]

    config.add_extension("_ccallback_c",
                         sources=["_ccallback_c.c"],
                         depends=depends,
                         include_dirs=[include_dir])

    config.add_extension("_test_ccallback",
                         sources=["src/_test_ccallback.c"],
                         depends=depends,
                         include_dirs=[include_dir])

    return config 
Example 2
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('scipy',parent_package,top_path)
    config.add_subpackage('cluster')
    config.add_subpackage('constants')
    config.add_subpackage('fftpack')
    config.add_subpackage('integrate')
    config.add_subpackage('interpolate')
    config.add_subpackage('io')
    config.add_subpackage('linalg')
    config.add_data_files('*.pxd')
    config.add_subpackage('misc')
    config.add_subpackage('odr')
    config.add_subpackage('optimize')
    config.add_subpackage('signal')
    config.add_subpackage('sparse')
    config.add_subpackage('spatial')
    config.add_subpackage('special')
    config.add_subpackage('stats')
    config.add_subpackage('ndimage')
    config.add_subpackage('_build_utils')
    config.add_subpackage('_lib')
    config.make_config_py()
    return config 
Example 3
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('numpy', parent_package, top_path)

    config.add_subpackage('compat')
    config.add_subpackage('core')
    config.add_subpackage('distutils')
    config.add_subpackage('doc')
    config.add_subpackage('f2py')
    config.add_subpackage('fft')
    config.add_subpackage('lib')
    config.add_subpackage('linalg')
    config.add_subpackage('ma')
    config.add_subpackage('matrixlib')
    config.add_subpackage('polynomial')
    config.add_subpackage('random')
    config.add_subpackage('testing')
    config.add_data_dir('doc')
    config.add_data_dir('tests')
    config.make_config_py() # installs __config__.py
    return config 
Example 4
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy import get_include
    from scipy._build_utils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    
    from os.path import join, dirname

    lapack_opt = get_info('lapack_opt')
    lib_inc = join(dirname(dirname(dirname(__file__))), '_lib')

    config = Configuration('_trlib', parent_package, top_path)
    config.add_extension('_trlib',
                         sources=['_trlib.c', 'trlib_krylov.c',
                                  'trlib_eigen_inverse.c', 'trlib_leftmost.c',
                                  'trlib_quadratic_zero.c', 'trlib_tri_factor.c'],
                         include_dirs=[get_include(), lib_inc, 'trlib'],
                         extra_info=lapack_opt,
                         )
    return config 
Example 5
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('fft', parent_package, top_path)

    config.add_data_dir('tests')

    # Configure fftpack_lite
    config.add_extension('fftpack_lite',
                         sources=['fftpack_litemodule.c', 'fftpack.c']
                         )

    return config 
Example 6
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('compat', parent_package, top_path)
    return config 
Example 7
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('distutils', parent_package, top_path)
    config.add_subpackage('command')
    config.add_subpackage('fcompiler')
    config.add_data_dir('tests')
    config.add_data_files('site.cfg')
    config.add_data_files('mingw/gfortran_vs2003_hack.c')
    config.make_config_py()
    return config 
Example 8
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('matrixlib', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 9
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('lib', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 10
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    config = Configuration('f2py', parent_package, top_path)

    config.add_data_dir('tests')

    config.add_data_files('src/fortranobject.c',
                          'src/fortranobject.h',
                          )

    config.make_svn_version_py()

    def generate_f2py_py(build_dir):
        f2py_exe = 'f2py' + os.path.basename(sys.executable)[6:]
        if f2py_exe[-4:] == '.exe':
            f2py_exe = f2py_exe[:-4] + '.py'
        if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':
            f2py_exe = f2py_exe + '.py'
        target = os.path.join(build_dir, f2py_exe)
        if newer(__file__, target):
            log.info('Creating %s', target)
            f = open(target, 'w')
            f.write(_get_f2py_shebang() + '\n')
            mainloc = os.path.join(os.path.dirname(__file__), "__main__.py")
            with open(mainloc) as mf:
                f.write(mf.read())
            f.close()
        return target

    config.add_scripts(generate_f2py_py)

    log.info('F2PY Version %s', config.get_version())

    return config 
Example 11
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('ma', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 12
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration, get_mathlibs
    config = Configuration('random', parent_package, top_path)

    def generate_libraries(ext, build_dir):
        config_cmd = config.get_config_cmd()
        libs = get_mathlibs()
        if sys.platform == 'win32':
            libs.append('Advapi32')
        ext.libraries.extend(libs)
        return None

    # enable unix large file support on 32 bit systems
    # (64 bit off_t, lseek -> lseek64 etc.)
    if sys.platform[:3] == "aix":
        defs = [('_LARGE_FILES', None)]
    else:
        defs = [('_FILE_OFFSET_BITS', '64'),
                ('_LARGEFILE_SOURCE', '1'),
                ('_LARGEFILE64_SOURCE', '1')]
    if needs_mingw_ftime_workaround():
        defs.append(("NPY_NEEDS_MINGW_TIME_WORKAROUND", None))

    libs = []
    # Configure mtrand
    config.add_extension('mtrand',
                         sources=[join('mtrand', x) for x in
                                  ['mtrand.c', 'randomkit.c', 'initarray.c',
                                   'distributions.c']]+[generate_libraries],
                         libraries=libs,
                         depends=[join('mtrand', '*.h'),
                                  join('mtrand', '*.pyx'),
                                  join('mtrand', '*.pxi'),],
                         define_macros=defs,
                         )

    config.add_data_files(('.', join('mtrand', 'randomkit.h')))
    config.add_data_dir('tests')

    return config 
Example 13
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('testing', parent_package, top_path)

    config.add_data_dir('tests')
    return config 
Example 14
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('polynomial', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 15
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('fftpack',parent_package, top_path)

    config.add_data_dir('tests')

    dfftpack_src = [join('src/dfftpack','*.f')]
    config.add_library('dfftpack', sources=dfftpack_src)

    fftpack_src = [join('src/fftpack','*.f')]
    config.add_library('fftpack', sources=fftpack_src)

    sources = ['fftpack.pyf','src/zfft.c','src/drfft.c','src/zrfft.c',
               'src/zfftnd.c', 'src/dct.c.src', 'src/dst.c.src']

    config.add_extension('_fftpack',
        sources=sources,
        libraries=['dfftpack', 'fftpack'],
        include_dirs=['src'],
        depends=(dfftpack_src + fftpack_src))

    config.add_extension('convolve',
        sources=['convolve.pyf','src/convolve.c'],
        libraries=['dfftpack'],
        depends=dfftpack_src,
    )
    return config 
Example 16
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

    config = Configuration('csgraph', parent_package, top_path)

    config.add_data_dir('tests')

    config.add_extension('_shortest_path',
         sources=['_shortest_path.c'],
         include_dirs=[numpy.get_include()])

    config.add_extension('_traversal',
         sources=['_traversal.c'],
         include_dirs=[numpy.get_include()])

    config.add_extension('_min_spanning_tree',
         sources=['_min_spanning_tree.c'],
         include_dirs=[numpy.get_include()])
    
    config.add_extension('_reordering',
         sources=['_reordering.c'],
         include_dirs=[numpy.get_include()])

    config.add_extension('_tools',
         sources=['_tools.c'],
         include_dirs=[numpy.get_include()])

    return config 
Example 17
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers

    config = Configuration('isolve',parent_package,top_path)

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

    # iterative methods
    methods = ['BiCGREVCOM.f.src',
               'BiCGSTABREVCOM.f.src',
               'CGREVCOM.f.src',
               'CGSREVCOM.f.src',
#               'ChebyREVCOM.f.src',
               'GMRESREVCOM.f.src',
#               'JacobiREVCOM.f.src',
               'QMRREVCOM.f.src',
#               'SORREVCOM.f.src'
               ]

    Util = ['STOPTEST2.f.src','getbreak.f.src']
    sources = Util + methods + ['_iterative.pyf.src']
    sources = [join('iterative', x) for x in sources]
    sources += get_g77_abi_wrappers(lapack_opt)

    config.add_extension('_iterative',
                         sources=sources,
                         extra_info=lapack_opt)

    config.add_data_dir('tests')

    return config 
Example 18
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('lobpcg',parent_package,top_path)
    config.add_data_dir('tests')

    return config 
Example 19
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('eigen',parent_package,top_path)

    config.add_subpackage(('arpack'))
    config.add_subpackage(('lobpcg'))

    return config 
Example 20
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('linalg',parent_package,top_path)

    config.add_subpackage(('isolve'))
    config.add_subpackage(('dsolve'))
    config.add_subpackage(('eigen'))

    config.add_data_dir('tests')

    return config 
Example 21
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('misc',parent_package,top_path)
    config.add_data_files('*.dat')
    config.add_data_dir('tests')
    return config 
Example 22
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('_lsq', parent_package, top_path)
    config.add_extension('givens_elimination',
                         sources=['givens_elimination.c'])
    return config 
Example 23
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('stats', parent_package, top_path)

    config.add_data_dir('tests')

    statlib_src = [join('statlib', '*.f')]
    config.add_library('statlib', sources=statlib_src)

    # add statlib module
    config.add_extension('statlib',
        sources=['statlib.pyf'],
        f2py_options=['--no-wrap-functions'],
        libraries=['statlib'],
        depends=statlib_src
    )

    # add _stats module
    config.add_extension('_stats',
        sources=['_stats.c'],
    )

    # add mvn module
    config.add_extension('mvn',
        sources=['mvn.pyf','mvndst.f'],
    )

    return config 
Example 24
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_name='special', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('_precompute', parent_name, top_path)
    return config 
Example 25
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    import warnings
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info, BlasNotFoundError
    config = Configuration('odr', parent_package, top_path)

    libodr_files = ['d_odr.f',
                    'd_mprec.f',
                    'dlunoc.f']

    blas_info = get_info('blas_opt')
    if blas_info:
        libodr_files.append('d_lpk.f')
    else:
        warnings.warn(BlasNotFoundError.__doc__)
        libodr_files.append('d_lpkbls.f')

    odrpack_src = [join('odrpack', x) for x in libodr_files]
    config.add_library('odrpack', sources=odrpack_src)

    sources = ['__odrpack.c']
    libraries = ['odrpack'] + blas_info.pop('libraries', [])
    include_dirs = ['.'] + blas_info.pop('include_dirs', [])
    config.add_extension('__odrpack',
        sources=sources,
        libraries=libraries,
        include_dirs=include_dirs,
        depends=(['odrpack.h'] + odrpack_src),
        **blas_info
    )

    config.add_data_dir('tests')
    return config 
Example 26
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):

    config = Configuration('ndimage', parent_package, top_path)

    include_dirs = ['src',
                    get_include(),
                    os.path.join(os.path.dirname(__file__), '..', '_lib', 'src')]

    config.add_extension("_nd_image",
        sources=["src/nd_image.c","src/ni_filters.c",
                 "src/ni_fourier.c","src/ni_interpolation.c",
                 "src/ni_measure.c",
                 "src/ni_morphology.c","src/ni_support.c"],
        include_dirs=include_dirs)

    # Cython wants the .c and .pyx to have the underscore.
    config.add_extension("_ni_label",
                         sources=["src/_ni_label.c",],
                         include_dirs=['src']+[get_include()])

    config.add_extension("_ctest",
                         sources=["src/_ctest.c"],
                         include_dirs=[get_include()])

    config.add_extension("_ctest_oldapi",
                         sources=["src/_ctest.c"],
                         include_dirs=[get_include()],
                         define_macros=[("OLDAPI", 1)])

    config.add_extension("_cytest",
                         sources=["src/_cytest.c"])
    
    config.add_data_dir('tests')

    return config 
Example 27
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('constants', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 28
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('harwell_boeing',parent_package,top_path)
    config.add_data_dir('tests')

    return config 
Example 29
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='io',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('matlab', parent_package, top_path)
    config.add_extension('streams', sources=['streams.c'])
    config.add_extension('mio_utils', sources=['mio_utils.c'])
    config.add_extension('mio5_utils', sources=['mio5_utils.c'])
    config.add_data_dir('tests')
    return config 
Example 30
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('io', parent_package, top_path)

    config.add_data_dir('tests')
    config.add_subpackage('matlab')
    config.add_subpackage('arff')
    config.add_subpackage('harwell_boeing')
    return config 
Example 31
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('fft', parent_package, top_path)

    config.add_data_dir('tests')

    # Configure pocketfft_internal
    config.add_extension('pocketfft_internal',
                         sources=['pocketfft.c']
                         )

    return config 
Example 32
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('compat', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 33
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('distutils', parent_package, top_path)
    config.add_subpackage('command')
    config.add_subpackage('fcompiler')
    config.add_data_dir('tests')
    config.add_data_files('site.cfg')
    config.add_data_files('mingw/gfortran_vs2003_hack.c')
    config.make_config_py()
    return config 
Example 34
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('matrixlib', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 35
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('lib', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 36
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    config = Configuration('f2py', parent_package, top_path)
    config.add_data_dir('tests')
    config.add_data_files(
        'src/fortranobject.c',
        'src/fortranobject.h')
    return config 
Example 37
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('ma', parent_package, top_path)
    config.add_data_dir('tests')
    return config 
Example 38
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('testing', parent_package, top_path)

    config.add_subpackage('_private')
    config.add_data_dir('tests')
    return config 
Example 39
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('fftpack',parent_package, top_path)

    config.add_data_dir('tests')

    dfftpack_src = [join('src/dfftpack','*.f')]
    config.add_library('dfftpack', sources=dfftpack_src)

    fftpack_src = [join('src/fftpack','*.f')]
    config.add_library('fftpack', sources=fftpack_src)

    sources = ['fftpack.pyf','src/zfft.c','src/drfft.c','src/zrfft.c',
               'src/zfftnd.c', 'src/dct.c.src', 'src/dst.c.src']

    config.add_extension('_fftpack',
        sources=sources,
        libraries=['dfftpack', 'fftpack'],
        include_dirs=['src'],
        depends=(dfftpack_src + fftpack_src))

    config.add_extension('convolve',
        sources=['convolve.pyf','src/convolve.c'],
        libraries=['dfftpack'],
        depends=dfftpack_src,
    )
    return config 
Example 40
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

    config = Configuration('csgraph', parent_package, top_path)

    config.add_data_dir('tests')

    config.add_extension('_shortest_path',
         sources=['_shortest_path.c'],
         include_dirs=[numpy.get_include()])

    config.add_extension('_traversal',
         sources=['_traversal.c'],
         include_dirs=[numpy.get_include()])

    config.add_extension('_min_spanning_tree',
         sources=['_min_spanning_tree.c'],
         include_dirs=[numpy.get_include()])
    
    config.add_extension('_reordering',
         sources=['_reordering.c'],
         include_dirs=[numpy.get_include()])

    config.add_extension('_tools',
         sources=['_tools.c'],
         include_dirs=[numpy.get_include()])

    return config 
Example 41
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from scipy._build_utils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers

    config = Configuration('isolve',parent_package,top_path)

    lapack_opt = get_info('lapack_opt')

    # iterative methods
    methods = ['BiCGREVCOM.f.src',
               'BiCGSTABREVCOM.f.src',
               'CGREVCOM.f.src',
               'CGSREVCOM.f.src',
#               'ChebyREVCOM.f.src',
               'GMRESREVCOM.f.src',
#               'JacobiREVCOM.f.src',
               'QMRREVCOM.f.src',
#               'SORREVCOM.f.src'
               ]

    Util = ['getbreak.f.src']
    sources = Util + methods + ['_iterative.pyf.src']
    sources = [join('iterative', x) for x in sources]
    sources += get_g77_abi_wrappers(lapack_opt)

    config.add_extension('_iterative',
                         sources=sources,
                         extra_info=lapack_opt)

    config.add_data_dir('tests')

    return config 
Example 42
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from scipy._build_utils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers

    lapack_opt = get_info('lapack_opt')

    config = Configuration('arpack', parent_package, top_path)

    arpack_sources = [join('ARPACK','SRC', '*.f')]
    arpack_sources.extend([join('ARPACK','UTIL', '*.f')])

    arpack_sources += get_g77_abi_wrappers(lapack_opt)

    config.add_library('arpack_scipy', sources=arpack_sources,
                       include_dirs=[join('ARPACK', 'SRC')])

    ext_sources = ['arpack.pyf.src']
    config.add_extension('_arpack',
                         sources=ext_sources,
                         libraries=['arpack_scipy'],
                         extra_info=lapack_opt,
                         depends=arpack_sources,
                         )

    config.add_data_dir('tests')

    # Add license files
    config.add_data_files('ARPACK/COPYING')

    return config 
Example 43
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('eigen',parent_package,top_path)

    config.add_subpackage(('arpack'))
    config.add_subpackage(('lobpcg'))

    return config 
Example 44
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('linalg',parent_package,top_path)

    config.add_subpackage(('isolve'))
    config.add_subpackage(('dsolve'))
    config.add_subpackage(('eigen'))

    config.add_data_dir('tests')

    return config 
Example 45
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('_lib', parent_package, top_path)
    config.add_data_files('tests/*.py')

    include_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
    depends = [os.path.join(include_dir, 'ccallback.h')]

    config.add_extension("_ccallback_c",
                         sources=["_ccallback_c.c"],
                         depends=depends,
                         include_dirs=[include_dir])

    config.add_extension("_test_ccallback",
                         sources=["src/_test_ccallback.c"],
                         depends=depends,
                         include_dirs=[include_dir])

    config.add_extension("_fpumode",
                         sources=["_fpumode.c"])

    def get_messagestream_config(ext, build_dir):
        # Generate a header file containing defines
        config_cmd = config.get_config_cmd()
        defines = []
        if config_cmd.check_func('open_memstream', decl=True, call=True):
            defines.append(('HAVE_OPEN_MEMSTREAM', '1'))
        target = os.path.join(os.path.dirname(__file__), 'src',
                              'messagestream_config.h')
        with open(target, 'w') as f:
            for name, value in defines:
                f.write('#define {0} {1}\n'.format(name, value))

    depends = [os.path.join(include_dir, 'messagestream.h')]
    config.add_extension("messagestream",
                         sources=["messagestream.c"] + [get_messagestream_config],
                         depends=depends,
                         include_dirs=[include_dir])

    return config 
Example 46
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('windows', parent_package, top_path)

    config.add_data_dir('tests')

    return config 
Example 47
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('transform', parent_package, top_path)

    config.add_data_dir('tests')

    return config 
Example 48
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils.system_info import get_info

    lapack_opt = get_info('lapack_opt', notfound_action=2)

    config = Configuration('interpolate', parent_package, top_path)

    fitpack_src = [join('fitpack', '*.f')]
    config.add_library('fitpack', sources=fitpack_src)

    config.add_extension('interpnd',
                         sources=['interpnd.c'])

    config.add_extension('_ppoly',
                         sources=['_ppoly.c'],
                         **lapack_opt)

    config.add_extension('_bspl',
                         sources=['_bspl.c'],
                         libraries=['fitpack'],
                         depends=['src/__fitpack.h'] + fitpack_src)

    config.add_extension('_fitpack',
                         sources=['src/_fitpackmodule.c'],
                         libraries=['fitpack'],
                         depends=(['src/__fitpack.h','src/multipack.h']
                                  + fitpack_src)
                         )

    config.add_extension('dfitpack',
                         sources=['src/fitpack.pyf'],
                         libraries=['fitpack'],
                         depends=fitpack_src,
                         )

    config.add_data_dir('tests')

    return config 
Example 49
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('misc',parent_package,top_path)
    config.add_data_files('*.dat')
    config.add_data_dir('tests')
    return config 
Example 50
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('_lsq', parent_package, top_path)
    config.add_extension('givens_elimination',
                         sources=['givens_elimination.c'])
    return config