示例#1
0
文件: setup.py 项目: xqding/mpi4py
def run_setup():
    """
    Call setup(*args, **kargs)
    """
    setup_args = metadata.copy()
    if setuptools:
        setup_args['zip_safe'] = False
    if setuptools and not os.getenv('CONDA_BUILD'):
        src = os.path.join('src', 'mpi4py.MPI.c')
        has_src = os.path.exists(os.path.join(topdir, src))
        has_git = os.path.isdir(os.path.join(topdir, '.git'))
        has_hg = os.path.isdir(os.path.join(topdir, '.hg'))
        if not has_src or has_git or has_hg:
            setup_args['setup_requires'] = ['Cython>=' + CYTHON]
    #
    setup(packages=['mpi4py', 'mpi4py.futures'],
          package_dir={'mpi4py': 'src/mpi4py'},
          package_data={
              'mpi4py': [
                  '*.pxd',
                  'include/mpi4py/*.h',
                  'include/mpi4py/*.i',
                  'include/mpi4py/*.pxi',
              ]
          },
          ext_modules=[Ext(**ext) for ext in ext_modules()],
          libraries=[Lib(**lib) for lib in libraries()],
          executables=[Exe(**exe) for exe in executables()],
          **setup_args)
示例#2
0
文件: setup.py 项目: pressel/mpi4py
def run_setup():
    """
    Call setup(*args, **kargs)
    """
    setup_args = metadata.copy()
    if setuptools:
        setup_args['zip_safe'] = False
    if setuptools:
        src = os.path.join('src', 'mpi4py.MPI.c')
        has_src = os.path.exists(os.path.join(topdir, src))
        has_git = os.path.isdir(os.path.join(topdir, '.git'))
        has_hg  = os.path.isdir(os.path.join(topdir, '.hg'))
        if not has_src or has_git or has_hg:
            setup_args['setup_requires'] = ['Cython>='+CYTHON]
    #
    setup(packages     = ['mpi4py'],
          package_dir  = {'mpi4py' : 'src'},
          package_data = {'mpi4py' : ['include/mpi4py/*.h',
                                      'include/mpi4py/*.pxd',
                                      'include/mpi4py/*.pyx',
                                      'include/mpi4py/*.pxi',
                                      'include/mpi4py/*.i',
                                      'MPI.pxd',
                                      'libmpi.pxd',]},
          ext_modules  = [Ext(**ext) for ext in ext_modules()],
          libraries    = [Lib(**lib) for lib in libraries()  ],
          executables  = [Exe(**exe) for exe in executables()],
          **setup_args)
示例#3
0
文件: setup.py 项目: mpi4py/mpi4py
def run_setup():
    """
    Call setuptools.setup(*args, **kwargs)
    """
    try:
        import setuptools
    except ImportError:
        setuptools = None
    from mpidistutils import setup
    from mpidistutils import Extension  as Ext
    from mpidistutils import Executable as Exe
    #
    from mpidistutils import build_src
    build_src.sources = sources()
    #
    builder_args = dict(
        ext_modules = [Ext(**ext) for ext in extensions()],
        executables = [Exe(**exe) for exe in executables()],
    )
    if setuptools:
        builder_args['zip_safe'] = False
        metadata.update(metadata_extra)
    #
    setup_args = dict(i for d in (
        metadata,
        package_info,
        builder_args,
    ) for i in d.items())
    #
    setup(**setup_args)
示例#4
0
文件: setup.py 项目: mpi4py/mpi4py
def run_skbuild():
    """
    Call skbuild.setup(*args, **kwargs)
    """
    from skbuild import setup
    #
    builder_args = dict(
        cmake_source_dir = 'src/mpi4py',
    )
    metadata.update(metadata_extra)
    #
    setup_args = dict(i for d in (
        metadata,
        package_info,
        builder_args,
    ) for i in d.items())
    #
    setup(**setup_args)
示例#5
0
from mpidistutils import setup
#from distutils.core import setup

import subprocess

m1 = Extension('adios_mpi',
               sources=['adios_mpi.cpp'],
               define_macros=[],
               include_dirs=[np.get_include()],
               library_dirs=[],
               libraries=[],
               extra_objects=[])

p = subprocess.Popen(["adios_config", "-c"], stdout=subprocess.PIPE)
for path in p.communicate()[0].strip().split(" "):
    if path.startswith('-I'):
        m1.include_dirs.append(path.replace('-I', '', 1))

p = subprocess.Popen(["adios_config", "-l"], stdout=subprocess.PIPE)
for path in p.communicate()[0].strip().split(" "):
    if path.startswith('-L'):
        m1.library_dirs.append(path.replace('-L', '', 1))
    if path.startswith('-l'):
        m1.libraries.append(path.replace('-l', '', 1))

setup(name='Adios_MPI',
      version='1.0',
      description='Python Module for Adios MPI',
      url='http://www.olcf.ornl.gov/center-projects/adios/',
      ext_modules=[m1])
示例#6
0
from mpidistutils import setup
#from distutils.core import setup

import subprocess

m1 = Extension('adios_mpi', 
               sources=['adios_mpi.cpp'], 
               define_macros=[],
               include_dirs = [np.get_include()],
               library_dirs = [],
               libraries = [],
               extra_objects = [])

p = subprocess.Popen(["adios_config", "-c"], stdout=subprocess.PIPE)
for path in p.communicate()[0].strip().split(" "):
    if path.startswith('-I'):
        m1.include_dirs.append(path.replace('-I', '', 1))

p = subprocess.Popen(["adios_config", "-l"], stdout=subprocess.PIPE)
for path in p.communicate()[0].strip().split(" "):
    if path.startswith('-L'):
        m1.library_dirs.append(path.replace('-L', '', 1))
    if path.startswith('-l'):
        m1.libraries.append(path.replace('-l', '', 1))

setup(name = 'Adios_MPI',
      version = '1.0',
      description = 'Python Module for Adios MPI',
      url = 'http://www.olcf.ornl.gov/center-projects/adios/',
      ext_modules = [m1])