本文整理汇总了Python中numpy.distutils.misc_util.get_info函数的典型用法代码示例。如果您正苦于以下问题:Python get_info函数的具体用法?Python get_info怎么用?Python get_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_info函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, *args, **kwargs):
from numpy import get_include
from numpy.distutils.misc_util import get_info
kwargs.update(get_info('npymath'))
kwargs['include_dirs'] += [get_include()]
Extension.__init__(self, *args, **kwargs)
开发者ID:REVLWorld,项目名称:pyhacrf,代码行数:7,代码来源:setup.py
示例2: configuration
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration, get_info
config = Configuration('ssm', parent_package, top_path)
info = get_info("npymath")
config.add_extension('_statespace',
include_dirs=['dismalpy/src'],
sources=['_statespace.c'], extra_info=info)
config.add_extension('_kalman_filter',
include_dirs=['dismalpy/src'],
sources=['_kalman_filter.c'], extra_info=info)
config.add_extension('_kalman_smoother',
include_dirs=['dismalpy/src'],
sources=['_kalman_smoother.c'], extra_info=info)
config.add_extension('_simulation_smoother',
include_dirs=['dismalpy/src'],
sources=['_simulation_smoother.c'], extra_info=info)
config.add_extension('_tools',
include_dirs=['dismalpy/src'],
sources=['_tools.c'])
config.add_subpackage('compat')
config.add_data_dir('tests')
config.add_subpackage('_filters')
config.add_subpackage('_smoothers')
config.make_config_py()
return config
开发者ID:dismalpy,项目名称:dismalpy,代码行数:28,代码来源:setup.py
示例3: __init__
def __init__(self):
# Need to import it here since setuptools may monkeypatch it
from distutils.dist import Distribution
self._verbose = False
self._compiler = new_compiler()
customize_compiler(self._compiler)
self._build_ext = build_ext(Distribution())
self._build_ext.finalize_options()
self._py_lib_dirs = self._build_ext.library_dirs
self._py_include_dirs = self._build_ext.include_dirs
self._math_info = np_misc.get_info('npymath')
开发者ID:FedericoStra,项目名称:numba,代码行数:11,代码来源:platform.py
示例4: configuration
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('special', parent_package, top_path)
define_macros = []
if sys.platform=='win32':
# define_macros.append(('NOINFINITIES',None))
# define_macros.append(('NONANS',None))
define_macros.append(('_USE_MATH_DEFINES',None))
# C libraries
config.add_library('sc_c_misc',sources=[join('c_misc','*.c')])
config.add_library('sc_cephes',sources=[join('cephes','*.c')],
include_dirs=[get_python_inc(), get_numpy_include_dirs()],
macros=define_macros)
# Fortran libraries
config.add_library('sc_mach',sources=[join('mach','*.f')],
config_fc={'noopt':(__file__,1)})
config.add_library('sc_toms',sources=[join('amos','*.f')])
config.add_library('sc_amos',sources=[join('toms','*.f')])
config.add_library('sc_cdf',sources=[join('cdflib','*.f')])
config.add_library('sc_specfun',sources=[join('specfun','*.f')])
# Extension _cephes
sources = ['_cephesmodule.c', 'amos_wrappers.c', 'specfun_wrappers.c',
'toms_wrappers.c','cdf_wrappers.c','ufunc_extras.c']
config.add_extension('_cephes', sources=sources,
libraries=['sc_amos','sc_toms','sc_c_misc','sc_cephes','sc_mach',
'sc_cdf', 'sc_specfun'],
depends=["ufunc_extras.h", "cephes.h",
"amos_wrappers.h", "toms_wrappers.h",
"cdf_wrappers.h", "specfun_wrappers.h",
"c_misc/misc.h", "cephes_doc.h",
"cephes/mconf.h", "cephes/cephes_names.h"],
define_macros = define_macros,
extra_info=get_info("npymath")
)
# Extension specfun
config.add_extension('specfun',
sources=['specfun.pyf'],
f2py_options=['--no-wrap-functions'],
define_macros=[],
libraries=['sc_specfun'])
config.add_data_files('tests/*.py')
config.add_data_files('tests/data/README')
config.add_data_files('tests/data/*.npz')
return config
开发者ID:stefanv,项目名称:scipy3,代码行数:51,代码来源:setup.py
示例5: configuration
def configuration(parent_package='', top_path=None):
import numpy
from numpy.distutils.misc_util import Configuration
from numpy.distutils.misc_util import get_info
info = get_info('npymath')
config = Configuration('c_faces',
parent_package,
top_path)
config.add_extension('c_faces',
['c_faces.cpp'],
extra_info=info,
extra_compile_args= ["-Wall", "-Werror", "-O3"])
return config
开发者ID:catphive,项目名称:face_detector,代码行数:16,代码来源:setup.py
示例6: configuration
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration, get_info
config = Configuration('_filters', parent_package, top_path)
info = get_info("npymath")
config.add_extension('_conventional',
include_dirs=['dismalpy/src'],
sources=['_conventional.c'], extra_info=info)
config.add_extension('_univariate',
include_dirs=['dismalpy/src'],
sources=['_univariate.c'], extra_info=info)
config.add_extension('_inversions',
include_dirs=['dismalpy/src'],
sources=['_inversions.c'], extra_info=info)
config.make_config_py()
return config
开发者ID:dismalpy,项目名称:dismalpy,代码行数:18,代码来源:setup.py
示例7: _update_extensions
def _update_extensions(self):
import numpy
from numpy.distutils.misc_util import get_info
numpy_includes = [numpy.get_include()]
extra_incl = pkg_resources.resource_filename('numpy', 'core/include')
numpy_includes += [extra_incl]
numpy_includes = list(set(numpy_includes))
numpy_math_libs = get_info('npymath')
for extension in self.extensions:
if not hasattr(extension, 'include_dirs'):
continue
extension.include_dirs = list(set(extension.include_dirs +
numpy_includes))
if extension.name in EXT_REQUIRES_NUMPY_MATH_LIBS:
extension.include_dirs += numpy_math_libs['include_dirs']
extension.libraries += numpy_math_libs['libraries']
extension.library_dirs += numpy_math_libs['library_dirs']
开发者ID:bashtage,项目名称:statsmodels,代码行数:19,代码来源:setup.py
示例8: dict
"Sphinx", "sphinx-gallery", "numpydoc", "Pillow", "matplotlib"
]
setup_options = dict(
name="hmmlearn",
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
license=LICENSE,
url="https://github.com/hmmlearn/hmmlearn",
packages=["hmmlearn", "hmmlearn.tests"],
classifiers=CLASSIFIERS,
ext_modules=[
Extension("hmmlearn._hmmc", ["hmmlearn/_hmmc.c"],
extra_compile_args=["-O3"],
**get_info("npymath"))
],
install_requires=install_requires,
tests_require=tests_require,
extras_require={
"tests": tests_require,
"docs": docs_require
}
)
if __name__ == "__main__":
setup(**setup_options)
开发者ID:BiuBiuBiLL,项目名称:hmmlearn,代码行数:30,代码来源:setup.py
示例9: print
if not lapack_info:
# No LAPACK in NumPy
print('### Warning: Using unoptimized blas/lapack @@@')
MODULE_SOURCES.extend(lapack_lite_files[:-1]) # all but f2c.h
MODULE_DEPENDENCIES.extend(lapack_lite_files)
else:
if sys.platform == 'win32':
print('### Warning: python.xerbla.c is disabled ###')
else:
MODULE_SOURCES.extend(lapack_lite_files[:1]) # python_xerbla.c
MODULE_DEPENDENCIES.extend(lapack_lite_files[:1])
npymath_info = np_misc_util.get_info('npymath')
extra_opts = copy.deepcopy(lapack_info)
for key, val in npymath_info.items():
if extra_opts.get(key):
extra_opts[key].extend(val)
else:
extra_opts[key] = copy.deepcopy(val)
gufunc_module = Extension('gulinalg._impl',
sources = MODULE_SOURCES,
depends = MODULE_DEPENDENCIES,
**extra_opts)
packages = [
开发者ID:ContinuumIO,项目名称:gulinalg,代码行数:30,代码来源:setup.py
示例10: configuration
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info as get_system_info
config = Configuration('special', parent_package, top_path)
define_macros = []
if sys.platform == 'win32':
# define_macros.append(('NOINFINITIES',None))
# define_macros.append(('NONANS',None))
define_macros.append(('_USE_MATH_DEFINES',None))
curdir = os.path.abspath(os.path.dirname(__file__))
inc_dirs = [get_python_inc(), os.path.join(curdir, "c_misc")]
if inc_dirs[0] != get_python_inc(plat_specific=1):
inc_dirs.append(get_python_inc(plat_specific=1))
inc_dirs.insert(0, get_numpy_include_dirs())
# C libraries
c_misc_src = [join('c_misc','*.c')]
c_misc_hdr = [join('c_misc','*.h')]
cephes_src = [join('cephes','*.c')]
cephes_hdr = [join('cephes', '*.h')]
config.add_library('sc_c_misc',sources=c_misc_src,
include_dirs=[curdir] + inc_dirs,
depends=(cephes_hdr + cephes_src
+ c_misc_hdr + cephes_hdr
+ ['*.h']),
macros=define_macros)
config.add_library('sc_cephes',sources=cephes_src,
include_dirs=[curdir] + inc_dirs,
depends=(cephes_hdr + ['*.h']),
macros=define_macros)
# Fortran/C++ libraries
mach_src = [join('mach','*.f')]
amos_src = [join('amos','*.f')]
cdf_src = [join('cdflib','*.f')]
specfun_src = [join('specfun','*.f')]
config.add_library('sc_mach',sources=mach_src,
config_fc={'noopt':(__file__,1)})
config.add_library('sc_amos',sources=amos_src)
config.add_library('sc_cdf',sources=cdf_src)
config.add_library('sc_specfun',sources=specfun_src)
# Extension specfun
config.add_extension('specfun',
sources=['specfun.pyf'],
f2py_options=['--no-wrap-functions'],
depends=specfun_src,
define_macros=[],
libraries=['sc_specfun'])
# Extension _ufuncs
headers = ['*.h', join('c_misc', '*.h'), join('cephes', '*.h')]
ufuncs_src = ['_ufuncs.c', 'sf_error.c', '_logit.c.src',
"amos_wrappers.c", "cdf_wrappers.c", "specfun_wrappers.c"]
ufuncs_dep = (headers + ufuncs_src + amos_src + c_misc_src + cephes_src
+ mach_src + cdf_src + specfun_src)
cfg = dict(get_system_info('lapack_opt'))
cfg.setdefault('include_dirs', []).extend([curdir] + inc_dirs + [numpy.get_include()])
cfg.setdefault('libraries', []).extend(['sc_amos','sc_c_misc','sc_cephes','sc_mach',
'sc_cdf', 'sc_specfun'])
cfg.setdefault('define_macros', []).extend(define_macros)
config.add_extension('_ufuncs',
depends=ufuncs_dep,
sources=ufuncs_src,
extra_info=get_info("npymath"),
**cfg)
# Extension _ufuncs_cxx
ufuncs_cxx_src = ['_ufuncs_cxx.cxx', 'sf_error.c',
'_faddeeva.cxx', 'Faddeeva.cc']
ufuncs_cxx_dep = (headers + ufuncs_cxx_src + cephes_src
+ ['*.hh'])
config.add_extension('_ufuncs_cxx',
sources=ufuncs_cxx_src,
depends=ufuncs_cxx_dep,
include_dirs=[curdir],
define_macros=define_macros,
extra_info=get_info("npymath"))
cfg = dict(get_system_info('lapack_opt'))
config.add_extension('_ellip_harm_2',
sources=['_ellip_harm_2.c', 'sf_error.c',],
**cfg
)
config.add_data_files('tests/*.py')
config.add_data_files('tests/data/README')
config.add_data_files('tests/data/*.npz')
return config
开发者ID:ymarfoq,项目名称:outilACVDesagregation,代码行数:93,代码来源:setup.py
示例11: get_ext_modules
def get_ext_modules():
"""
Return a list of Extension instances for the setup() call.
"""
# Note we don't import Numpy at the toplevel, since setup.py
# should be able to run without Numpy for pip to discover the
# build dependencies
import numpy.distutils.misc_util as np_misc
# Inject required options for extensions compiled against the Numpy
# C API (include dirs, library dirs etc.)
np_compile_args = np_misc.get_info('npymath')
ext_dynfunc = Extension(name='numba._dynfunc',
sources=['numba/_dynfuncmod.c'],
extra_compile_args=CFLAGS,
depends=['numba/_pymodule.h',
'numba/_dynfunc.c'])
ext_dispatcher = Extension(name="numba._dispatcher",
sources=['numba/_dispatcher.c',
'numba/_typeof.c',
'numba/_hashtable.c',
'numba/_dispatcherimpl.cpp',
'numba/typeconv/typeconv.cpp'],
depends=["numba/_pymodule.h",
"numba/_dispatcher.h",
"numba/_typeof.h",
"numba/_hashtable.h"],
**np_compile_args)
ext_helperlib = Extension(name="numba._helperlib",
sources=["numba/_helpermod.c",
"numba/_math_c99.c"],
extra_compile_args=CFLAGS,
extra_link_args=install_name_tool_fixer,
depends=["numba/_pymodule.h",
"numba/_math_c99.h",
"numba/_helperlib.c",
"numba/_lapack.c",
"numba/_npymath_exports.c",
"numba/_random.c",
"numba/_dictobject.c",
"numba/mathnames.inc",],
**np_compile_args)
ext_typeconv = Extension(name="numba.typeconv._typeconv",
sources=["numba/typeconv/typeconv.cpp",
"numba/typeconv/_typeconv.cpp"],
depends=["numba/_pymodule.h"],
)
ext_npyufunc_ufunc = Extension(name="numba.npyufunc._internal",
sources=["numba/npyufunc/_internal.c"],
depends=["numba/npyufunc/_ufunc.c",
"numba/npyufunc/_internal.h",
"numba/_pymodule.h"],
**np_compile_args)
ext_npyufunc_workqueue_impls = []
def check_file_at_path(path2file):
"""
Takes a list as a path, a single glob (*) is permitted as an entry which
indicates that expansion at this location is required (i.e. version
might not be known).
"""
found = None
path2check = [os.path.split(os.path.split(sys.executable)[0])[0]]
path2check += [os.getenv(n, '') for n in ['CONDA_PREFIX', 'PREFIX']]
if sys.platform.startswith('win'):
path2check += [os.path.join(p, 'Library') for p in path2check]
for p in path2check:
if p:
if '*' in path2file:
globloc = path2file.index('*')
searchroot = os.path.join(*path2file[:globloc])
try:
potential_locs = os.listdir(os.path.join(p, searchroot))
except BaseException:
continue
searchfor = path2file[globloc + 1:]
for x in potential_locs:
potpath = os.path.join(p, searchroot, x, *searchfor)
if os.path.isfile(potpath):
found = p # the latest is used
elif os.path.isfile(os.path.join(p, *path2file)):
found = p # the latest is used
return found
# Search for Intel TBB, first check env var TBBROOT then conda locations
tbb_root = os.getenv('TBBROOT')
if not tbb_root:
tbb_root = check_file_at_path(['include', 'tbb', 'tbb.h'])
# Set various flags for use in TBB and openmp. On OSX, also find OpenMP!
have_openmp = True
if sys.platform.startswith('win'):
#.........这里部分代码省略.........
开发者ID:numba,项目名称:numba,代码行数:101,代码来源:setup.py
示例12: test_installed_npymath_ini
def test_installed_npymath_ini():
# Regression test for gh-7707. If npymath.ini wasn't installed, then this
# will give an error.
info = get_info('npymath')
开发者ID:AlerzDev,项目名称:Brazo-Proyecto-Final,代码行数:4,代码来源:test_misc_util.py
示例13: get_ext_modules
def get_ext_modules():
"""
Return a list of Extension instances for the setup() call.
"""
# Note we don't import Numpy at the toplevel, since setup.py
# should be able to run without Numpy for pip to discover the
# build dependencies
import numpy.distutils.misc_util as np_misc
# Inject required options for extensions compiled against the Numpy
# C API (include dirs, library dirs etc.)
np_compile_args = np_misc.get_info("npymath")
ext_dynfunc = Extension(
name="numba._dynfunc",
sources=["numba/_dynfuncmod.c"],
extra_compile_args=CFLAGS,
depends=["numba/_pymodule.h", "numba/_dynfunc.c"],
)
ext_dispatcher = Extension(
name="numba._dispatcher",
sources=[
"numba/_dispatcher.c",
"numba/_typeof.c",
"numba/_hashtable.c",
"numba/_dispatcherimpl.cpp",
"numba/typeconv/typeconv.cpp",
],
depends=["numba/_pymodule.h", "numba/_dispatcher.h", "numba/_typeof.h", "numba/_hashtable.h"],
**np_compile_args
)
ext_helperlib = Extension(
name="numba._helperlib",
sources=["numba/_helpermod.c", "numba/_math_c99.c"],
extra_compile_args=CFLAGS,
extra_link_args=install_name_tool_fixer,
depends=[
"numba/_pymodule.h",
"numba/_math_c99.h",
"numba/_helperlib.c",
"numba/_lapack.c",
"numba/_npymath_exports.c",
"numba/_random.c",
"numba/mathnames.inc",
],
**np_compile_args
)
ext_typeconv = Extension(
name="numba.typeconv._typeconv",
sources=["numba/typeconv/typeconv.cpp", "numba/typeconv/_typeconv.cpp"],
depends=["numba/_pymodule.h"],
)
ext_npyufunc_ufunc = Extension(
name="numba.npyufunc._internal",
sources=["numba/npyufunc/_internal.c"],
depends=["numba/npyufunc/_ufunc.c", "numba/npyufunc/_internal.h", "numba/_pymodule.h"],
**np_compile_args
)
ext_npyufunc_workqueue = Extension(
name="numba.npyufunc.workqueue", sources=["numba/npyufunc/workqueue.c"], depends=["numba/npyufunc/workqueue.h"]
)
ext_mviewbuf = Extension(name="numba.mviewbuf", sources=["numba/mviewbuf.c"])
ext_nrt_python = Extension(
name="numba.runtime._nrt_python",
sources=["numba/runtime/_nrt_pythonmod.c", "numba/runtime/nrt.c"],
depends=["numba/runtime/nrt.h", "numba/_pymodule.h", "numba/runtime/_nrt_python.c"],
**np_compile_args
)
ext_jitclass_box = Extension(
name="numba.jitclass._box", sources=["numba/jitclass/_box.c"], depends=["numba/_pymodule.h"]
)
ext_modules = [
ext_dynfunc,
ext_dispatcher,
ext_helperlib,
ext_typeconv,
ext_npyufunc_ufunc,
ext_npyufunc_workqueue,
ext_mviewbuf,
ext_nrt_python,
ext_jitclass_box,
]
return ext_modules
开发者ID:stuartarchibald,项目名称:numba,代码行数:93,代码来源:setup.py
示例14: configuration
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info as get_system_info
config = Configuration('special', parent_package, top_path)
define_macros = []
if sys.platform == 'win32':
# define_macros.append(('NOINFINITIES',None))
# define_macros.append(('NONANS',None))
define_macros.append(('_USE_MATH_DEFINES',None))
curdir = os.path.abspath(os.path.dirname(__file__))
inc_dirs = [get_python_inc(), os.path.join(curdir, "c_misc")]
if inc_dirs[0] != get_python_inc(plat_specific=1):
inc_dirs.append(get_python_inc(plat_specific=1))
inc_dirs.insert(0, get_numpy_include_dirs())
inc_dirs.append(join(dirname(dirname(__file__)), '_lib'))
# C libraries
c_misc_src = [join('c_misc','*.c')]
c_misc_hdr = [join('c_misc','*.h')]
cephes_src = [join('cephes','*.c')]
cephes_hdr = [join('cephes', '*.h')]
config.add_library('sc_c_misc',sources=c_misc_src,
include_dirs=[curdir] + inc_dirs,
depends=(cephes_hdr + cephes_src
+ c_misc_hdr + cephes_hdr
+ ['*.h']),
macros=define_macros)
config.add_library('sc_cephes',sources=cephes_src,
include_dirs=[curdir] + inc_dirs,
depends=(cephes_hdr + ['*.h']),
macros=define_macros)
# Fortran/C++ libraries
mach_src = [join('mach','*.f')]
amos_src = [join('amos','*.f')]
cdf_src = [join('cdflib','*.f')]
specfun_src = [join('specfun','*.f')]
config.add_library('sc_mach',sources=mach_src,
config_fc={'noopt':(__file__,1)})
config.add_library('sc_amos',sources=amos_src)
config.add_library('sc_cdf',sources=cdf_src)
config.add_library('sc_specfun',sources=specfun_src)
# Extension specfun
config.add_extension('specfun',
sources=['specfun.pyf'],
f2py_options=['--no-wrap-functions'],
depends=specfun_src,
define_macros=[],
libraries=['sc_specfun'])
# Extension _ufuncs
headers = ['*.h', join('c_misc', '*.h'), join('cephes', '*.h')]
ufuncs_src = ['_ufuncs.c', 'sf_error.c', '_logit.c.src',
"amos_wrappers.c", "cdf_wrappers.c", "specfun_wrappers.c"]
ufuncs_dep = (headers + ufuncs_src + amos_src + c_misc_src + cephes_src
+ mach_src + cdf_src + specfun_src)
cfg = dict(get_system_info('lapack_opt'))
cfg.setdefault('include_dirs', []).extend([curdir] + inc_dirs + [numpy.get_include()])
cfg.setdefault('libraries', []).extend(['sc_amos','sc_c_misc','sc_cephes','sc_mach',
'sc_cdf', 'sc_specfun'])
cfg.setdefault('define_macros', []).extend(define_macros)
config.add_extension('_ufuncs',
depends=ufuncs_dep,
sources=ufuncs_src,
extra_info=get_info("npymath"),
**cfg)
# Extension _ufuncs_cxx
ufuncs_cxx_src = ['_ufuncs_cxx.cxx', 'sf_error.c',
'_faddeeva.cxx', 'Faddeeva.cc',
'_wright.cxx', 'wright.cc']
ufuncs_cxx_dep = (headers + ufuncs_cxx_src + cephes_src
+ ['*.hh'])
config.add_extension('_ufuncs_cxx',
sources=ufuncs_cxx_src,
depends=ufuncs_cxx_dep,
include_dirs=[curdir] + inc_dirs,
define_macros=define_macros,
extra_info=get_info("npymath"))
cfg = dict(get_system_info('lapack_opt'))
config.add_extension('_ellip_harm_2',
sources=['_ellip_harm_2.c', 'sf_error.c',],
**cfg
)
# Cython API
config.add_data_files('cython_special.pxd')
cython_special_src = ['cython_special.c', 'sf_error.c', '_logit.c.src',
"amos_wrappers.c", "cdf_wrappers.c", "specfun_wrappers.c"]
cython_special_dep = (headers + ufuncs_src + ufuncs_cxx_src + amos_src
+ c_misc_src + cephes_src + mach_src + cdf_src
+ specfun_src)
cfg = dict(get_system_info('lapack_opt'))
cfg.setdefault('include_dirs', []).extend([curdir] + inc_dirs + [numpy.get_include()])
#.........这里部分代码省略.........
开发者ID:Juanlu001,项目名称:scipy,代码行数:101,代码来源:setup.py
示例15: get_ext_modules
def get_ext_modules():
"""
Return a list of Extension instances for the setup() call.
"""
# Note we don't import Numpy at the toplevel, since setup.py
# should be able to run without Numpy for pip to discover the
# build dependencies
import numpy.distutils.misc_util as np_misc
# Inject required options for extensions compiled against the Numpy
# C API (include dirs, library dirs etc.)
np_compile_args = np_misc.get_info('npymath')
ext_dynfunc = Extension(name='numba._dynfunc',
sources=['numba/_dynfuncmod.c'],
extra_compile_args=CFLAGS,
depends=['numba/_pymodule.h',
'numba/_dynfunc.c'])
ext_dispatcher = Extension(name="numba._dispatcher",
sources=['numba/_dispatcher.c',
'numba/_typeof.c',
'numba/_hashtable.c',
'numba/_dispatcherimpl.cpp',
'numba/typeconv/typeconv.cpp'],
depends=["numba/_pymodule.h",
"numba/_dispatcher.h",
"numba/_typeof.h",
"numba/_hashtable.h"],
**np_compile_args)
ext_helperlib = Extension(name="numba._helperlib",
sources=["numba/_helpermod.c",
"numba/_math_c99.c"],
extra_compile_args=CFLAGS,
extra_link_args=install_name_tool_fixer,
depends=["numba/_pymodule.h",
"numba/_math_c99.h",
"numba/_helperlib.c",
"numba/_lapack.c",
"numba/_npymath_exports.c",
"numba/_random.c",
"numba/mathnames.inc"],
**np_compile_args)
ext_typeconv = Extension(name="numba.typeconv._typeconv",
sources=["numba/typeconv/typeconv.cpp",
"numba/typeconv/_typeconv.cpp"],
depends=["numba/_pymodule.h"],
)
ext_npyufunc_ufunc = Extension(name="numba.npyufunc._internal",
sources=["numba/npyufunc/_internal.c"],
depends=["numba/npyufunc/_ufunc.c",
"numba/npyufunc/_internal.h",
"numba/_pymodule.h"],
**np_compile_args)
tbb_root = os.getenv('TBBROOT')
if tbb_root:
print("Using TBBROOT=", tbb_root)
ext_npyufunc_workqueue = Extension(
name='numba.npyufunc.workqueue',
sources=['numba/npyufunc/tbbpool.cpp', 'numba/npyufunc/gufunc_scheduler.cpp'],
depends=['numba/npyufunc/workqueue.h'],
include_dirs=[os.path.join(tbb_root, 'include')],
extra_compile_args=[] if sys.platform.startswith('win') else ['-std=c++11'],
libraries =['tbb'],
library_dirs=[os.path.join(tbb_root, 'lib', 'intel64', 'gcc4.4'), # for Linux
os.path.join(tbb_root, 'lib'), # for MacOS
os.path.join(tbb_root, 'lib', 'intel64', 'vc_mt'), # for Windows
],
)
else:
ext_npyufunc_workqueue = Extension(
name='numba.npyufunc.workqueue',
sources=['numba/npyufunc/workqueue.c', 'numba/npyufunc/gufunc_scheduler.cpp'],
depends=['numba/npyufunc/workqueue.h'])
ext_mviewbuf = Extension(name='numba.mviewbuf',
extra_link_args=install_name_tool_fixer,
sources=['numba/mviewbuf.c'])
ext_nrt_python = Extension(name='numba.runtime._nrt_python',
sources=['numba/runtime/_nrt_pythonmod.c',
'numba/runtime/nrt.c'],
depends=['numba/runtime/nrt.h',
'numba/_pymodule.h',
'numba/runtime/_nrt_python.c'],
**np_compile_args)
ext_jitclass_box = Extension(name='numba.jitclass._box',
sources=['numba/jitclass/_box.c'],
depends=['numba/_pymodule.h'],
)
ext_cuda_extras = Extension(name='numba.cuda.cudadrv._extras',
sources=['numba/cuda/cudadrv/_extras.c'],
depends=['numba/_pymodule.h'],
#.........这里部分代码省略.........
开发者ID:cpcloud,项目名称:numba,代码行数:101,代码来源:setup.py
示例16: Extension
depends=tseries_depends + ['pandas/src/numpy_helper.h'],
sources=[srcpath('tseries', suffix=suffix),
'pandas/src/period.c',
'pandas/src/datetime/np_datetime.c',
'pandas/src/datetime/np_datetime_strings.c'],
include_dirs=[np.get_include()],
# pyrex_gdb=True,
# extra_compile_args=['-Wconversion']
)
sparse_ext = Extension('pandas._sparse',
sources=[srcpath('sparse', suffix=suffix)],
include_dirs=[np.get_include()])
npymath_info = get_info('npymath')
npymath_libdir = npymath_info['library_dirs'][0]
npymath_libdir = npymath_libdir.replace('\\\\', '\\')
ujson_ext = Extension('pandas._ujson',
sources=['pandas/src/ujson/python/ujson.c',
'pandas/src/ujson/python/objToJSON.c',
'pandas/src/ujson/python/JSONtoObj.c',
'pandas/src/ujson/lib/ultrajsonenc.c',
'pandas/src/ujson/lib/ultrajsondec.c',
'pandas/src/datetime/np_datetime.c'
],
include_dirs=['pandas/src/ujson/python',
'pandas/src/ujson/lib',
'pandas/src/datetime',
开发者ID:hughdbrown,项目名称:pandas,代码行数:31,代码来源:setup.py
示例17: configuration
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('special', parent_package, top_path)
define_macros = []
if sys.platform=='win32':
# define_macros.append(('NOINFINITIES',None))
# define_macros.append(('NONANS',None))
define_macros.append(('_USE_MATH_DEFINES',None))
curdir = os.path.abspath(os.path.dirname(__file__))
# C libraries
config.add_library('sc_c_misc',sources=[join('c_misc','*.c')],
include_dirs=[curdir, get_python_inc(), get_numpy_include_dirs()],
macros=define_macros)
config.add_library('sc_cephes',sources=[join('cephes','*.c')],
include_dirs=[curdir, get_python_inc(), get_numpy_include_dirs()],
macros=define_macros)
# Fortran/C++ libraries
config.add_library('sc_mach',sources=[join('mach','*.f')],
config_fc={'noopt':(__file__,1)})
config.add_library('sc_amos',sources=[join('amos','*.f')])
config.add_library('sc_cdf',sources=[join('cdflib','*.f')])
config.add_library('sc_specfun',sources=[join('specfun','*.f')])
# Extension specfun
config.add_extension('specfun',
sources=['specfun.pyf'],
f2py_options=['--no-wrap-functions'],
define_macros=[],
libraries=['sc_specfun'])
# Extension _ufuncs
config.add_extension('_ufuncs',
libraries=['sc_amos','sc_c_misc','sc_cephes','sc_mach',
'sc_cdf', 'sc_specfun'],
depends=["_logit.h", "cephes.h",
"amos_wrappers.h",
"cdf_wrappers.h", "specfun_wrappers.h",
"c_misc/misc.h", "cephes/mconf.h", "cephes/cephes_names.h"],
sources=['_ufuncs.c', 'sf_error.c', '_logit.c.src',
"amos_wrappers.c", "cdf_wrappers.c", "specfun_wrappers.c"],
include_dirs=[curdir],
define_macros = define_macros,
extra_info=get_info("npymath"))
# Extension _ufuncs_cxx
config.add_extension('_ufuncs_cxx',
sources=['_ufuncs_cxx.cxx',
'sf_error.c',
'_faddeeva.cxx',
'Faddeeva.cc',
],
libraries=['sc_cephes'],
include_dirs=[curdir],
define_macros=define_macros,
extra_info=get_info("npymath"))
config.add_data_files('tests/*.py')
config.add_data_files('tests/data/README')
config.add_data_files('tests/data/*.npz')
return config
开发者ID:alexleach,项目名称:scipy,代码行数:65,代码来源:setup.py
示例18: configuration
def configuration(parent_package="", top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info as get_system_info
config = Configuration("special", parent_package, top_path)
define_macros = []
if sys.platform == "win32":
# define_macros.append(('NOINFINITIES',None))
# define_macros.append(('NONANS',None))
define_macros.append(("_USE_MATH_DEFINES", None))
curdir = os.path.abspath(os.path.dirname(__file__))
inc_dirs = [get_python_inc(), os.path.join(curdir, "c_misc")]
if inc_dirs[0] != get_python_inc(plat_specific=1):
inc_dirs.append(get_python_inc(plat_specific=1))
inc_dirs.insert(0, get_numpy_include_dirs())
# C libraries
c_misc_src = [join("c_misc", "*.c")]
c_misc_hdr = [join("c_misc", "*.h")]
cephes_src = [join("cephes", "*.c")]
cephes_hdr = [join("cephes", "*.h")]
config.add_library(
"sc_c_misc",
sources=c_misc_src,
include_dirs=[curdir] + inc_dirs,
depends=(cephes_hdr + cephes_src + c_misc_hdr + cephes_hdr + ["*.h"]),
macros=define_macros,
)
config.add_library(
"sc_cephes",
sources=cephes_src,
include_dirs=[curdir] + inc_dirs,
depends=(cephes_hdr + ["*.h"]),
macros=define_macros,
)
# Fortran/C++ libraries
mach_src = [join("mach", "*.f")]
amos_src = [join("amos", "*.f")]
cdf_src = [join("cdflib", "*.f")]
specfun_src = [join("specfun", "*.f")]
config.add_library("sc_mach", sources=mach_src, config_fc={"noopt": (__file__, 1)})
config.add_library("sc_amos", sources=amos_src)
config.add_library("sc_cdf", sources=cdf_src)
config.add_library("sc_specfun", sources=specfun_src)
# Extension specfun
config.add_extension(
"specfun",
sources=["specfun.pyf"],
f2py_options=["--no-wrap-functions"],
depends=specfun_src,
define_macros=[],
libraries=["sc_specfun"],
)
# Extension _ufuncs
headers = ["*.h", join("c_misc", "*.h"), join("cephes", "*.h")]
ufuncs_src = ["_ufuncs.c", "sf_error.c", "_logit.c.src", "amos_wrappers.c", "cdf_wrappers.c", "specfun_wrappers.c"]
ufuncs_dep = headers + ufuncs_src + amos_src + c_misc_src + cephes_src + mach_src + cdf_src + specfun_src
cfg = dict(get_system_info("lapack_opt"))
cfg.setdefault("include_dirs", []).extend([curdir] + inc_dirs + [numpy.get_include()])
cfg.setdefault("libraries", []).extend(["sc_amos", "sc_c_misc", "sc_cephes", "sc_mach", "sc_cdf", "sc_specfun"])
cfg.setdefault("define_macros", []).extend(define_macros)
config.add_extension("_ufuncs", depends=ufuncs_dep, sources=ufuncs_src, extra_info=get_info("npymath"), **cfg)
# Extension _ufuncs_cxx
ufuncs_cxx_src = ["_ufuncs_cx
|
请发表评论