コード例 #1
0
ファイル: setup.py プロジェクト: cstausland/ppde_chris
def run_setup():
    if ('setuptools' in sys.modules):
        from os.path import exists, join
        metadata['zip_safe'] = False
        metadata['install_requires'] = ['numpy']
        if not exists(join('src', 'petsc4py.PETSc.c')):
            metadata['install_requires'] += ['Cython>='+CYTHON]
        PETSC_DIR = os.environ.get('PETSC_DIR')
        if not (PETSC_DIR and os.path.isdir(PETSC_DIR)):
            metadata['install_requires'] += ["petsc>=3.4,<3.5"]
    #
    setup(packages     = ['petsc4py',
                          'petsc4py.lib',],
          package_dir  = {'petsc4py'     : 'src',
                          'petsc4py.lib' : 'src/lib'},
          package_data = {'petsc4py'     : ['include/petsc4py/*.h',
                                            'include/petsc4py/*.i',
                                            'include/petsc4py/*.pxd',
                                            'include/petsc4py/*.pxi',
                                            'include/petsc4py/*.pyx',],
                          'petsc4py.lib' : ['petsc.cfg'],},
          ext_modules  = get_ext_modules(Extension),
          cmdclass     = {'config'     : config,
                          'build'      : build,
                          'build_src'  : build_src,
                          'build_ext'  : build_ext,
                          'test'       : test,
                          'sdist'      : sdist,
                          },
          **metadata)
コード例 #2
0
ファイル: setup.py プロジェクト: alexfikl/petsc
def run_setup():
    setup_args = metadata.copy()
    if setuptools:
        setup_args['zip_safe'] = False
        setup_args['install_requires'] = ['numpy']
        PETSC_DIR = os.environ.get('PETSC_DIR')
        if not (PETSC_DIR and os.path.isdir(PETSC_DIR)):
            vstr = setup_args['version'].split('.')[:2]
            x, y = int(vstr[0]), int(vstr[1])
            PETSC = ">=%s.%s,<%s.%s" % (x, y, x, y + 1)
            setup_args['install_requires'] += ['petsc' + PETSC]
    if setuptools:
        src = os.path.join('src', 'petsc4py.PETSc.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'))
        suffix = os.path.join('src', 'binding', 'petsc4py')
        in_petsc = topdir.endswith(os.path.sep + suffix)
        if not has_src or has_git or has_hg or in_petsc:
            setup_args['setup_requires'] = ['Cython>=' + CYTHON]
    #
    setup(packages=[
        'petsc4py',
        'petsc4py.lib',
    ],
          package_dir={
              'petsc4py': 'src',
              'petsc4py.lib': 'src/lib'
          },
          package_data={
              'petsc4py': [
                  'include/petsc4py/*.h',
                  'include/petsc4py/*.i',
                  'include/petsc4py/*.pxd',
                  'include/petsc4py/*.pxi',
                  'include/petsc4py/*.pyx',
                  'PETSc.pxd',
              ],
              'petsc4py.lib': ['petsc.cfg'],
          },
          ext_modules=get_ext_modules(Extension),
          cmdclass={
              'config': config,
              'build': build,
              'build_src': build_src,
              'build_ext': build_ext,
              'install': install,
              'clean': clean,
              'test': test,
              'sdist': sdist,
          },
          **setup_args)
コード例 #3
0
ファイル: setup.py プロジェクト: firedrakeproject/petsc4py
def run_setup():
    setup_args = metadata.copy()
    if setuptools:
        setup_args['zip_safe'] = False
        setup_args['install_requires'] = ['numpy']
        PETSC_DIR = os.environ.get('PETSC_DIR')
        if not (PETSC_DIR and os.path.isdir(PETSC_DIR)):
            vstr = setup_args['version'].split('.')[:2]
            x, y = int(vstr[0]), int(vstr[1])
            PETSC = ">=%s.%s,<%s.%s" % (x, y, x, y+1)
            setup_args['install_requires'] += ['petsc'+PETSC]
    if setuptools:
        src = os.path.join('src', 'petsc4py.PETSc.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     = ['petsc4py',
                          'petsc4py.lib',],
          package_dir  = {'petsc4py'     : 'src',
                          'petsc4py.lib' : 'src/lib'},
          package_data = {'petsc4py'     : ['include/petsc4py/*.h',
                                            'include/petsc4py/*.i',
                                            'include/petsc4py/*.pxd',
                                            'include/petsc4py/*.pxi',
                                            'include/petsc4py/*.pyx',
                                            'PETSc.pxd',],
                          'petsc4py.lib' : ['petsc.cfg'],},
          ext_modules  = get_ext_modules(Extension),
          cmdclass     = {'config'     : config,
                          'build'      : build,
                          'build_src'  : build_src,
                          'build_ext'  : build_ext,
                          'install'    : install,
                          'clean'      : clean,
                          'test'       : test,
                          'sdist'      : sdist,
                          },
          **setup_args)
コード例 #4
0
def run_setup():
    if ('setuptools' in sys.modules):
        from os.path import exists, join
        metadata['zip_safe'] = False
        metadata['install_requires'] = ['numpy']
        if not exists(join('src', 'petsc4py.PETSc.c')):
            metadata['install_requires'] += ['Cython>=' + CYTHON]
        PETSC_DIR = os.environ.get('PETSC_DIR')
        if not (PETSC_DIR and os.path.isdir(PETSC_DIR)):
            metadata['install_requires'] += ["petsc>=3.4,<3.5"]
    #
    setup(packages=[
        'petsc4py',
        'petsc4py.lib',
    ],
          package_dir={
              'petsc4py': 'src',
              'petsc4py.lib': 'src/lib'
          },
          package_data={
              'petsc4py': [
                  'include/petsc4py/*.h',
                  'include/petsc4py/*.i',
                  'include/petsc4py/*.pxd',
                  'include/petsc4py/*.pxi',
                  'include/petsc4py/*.pyx',
              ],
              'petsc4py.lib': ['petsc.cfg'],
          },
          ext_modules=get_ext_modules(Extension),
          cmdclass={
              'config': config,
              'build': build,
              'build_src': build_src,
              'build_ext': build_ext,
              'test': test,
              'sdist': sdist,
          },
          **metadata)