示例#1
0
文件: setup.py 项目: cheon7886/sfepy
        from enthought.mayavi import version

    except:
        from mayavi import version

    return version.version

def _cython_version(pkg_name):
    from Cython.Compiler.Version import version
    return version

def _igakit_version(pkg_name):
    return '0.1'

# Hard and soft dependency checking
package_check('numpy', INFO.NUMPY_MIN_VERSION)
package_check('scipy', INFO.SCIPY_MIN_VERSION)
package_check('matplotlib', INFO.MATPLOTLIB_MIN_VERSION)
package_check('pyparsing', INFO.PYPARSING_MIN_VERSION)
package_check('tables', INFO.PYTABLES_MIN_VERSION)
package_check(('enthought.mayavi', 'mayavi'),
              INFO.MAYAVI_MIN_VERSION,
              optional=True,
              version_getter=_mayavi_version)
package_check('sympy', INFO.SYMPY_MIN_VERSION, optional=True,
              messages={'missing opt'
                        : '%s was not found: some tests are going to fail!'})
package_check('igakit', INFO.IGAKIT_MIN_VERSION, optional=True,
              version_getter=_igakit_version,
              messages={'missing opt'
                        : '%s was not found: some tests are going to fail!'})
示例#2
0
文件: setup.py 项目: mjziebarth/sfepy
def check_versions(show_only=False):
    # Cython is a build dependency.
    package_check('cython',
                  INFO.CYTHON_MIN_VERSION,
                  version_getter=_cython_version,
                  show_only=show_only)

    # Check hard and soft dependencies.
    package_check('numpy', INFO.NUMPY_MIN_VERSION, show_only=show_only)
    package_check('scipy', INFO.SCIPY_MIN_VERSION, show_only=show_only)
    package_check('matplotlib',
                  INFO.MATPLOTLIB_MIN_VERSION,
                  show_only=show_only)
    package_check('pyparsing', INFO.PYPARSING_MIN_VERSION, show_only=show_only)
    package_check('tables', INFO.PYTABLES_MIN_VERSION, show_only=show_only)
    package_check(('enthought.mayavi', 'mayavi'),
                  INFO.MAYAVI_MIN_VERSION,
                  optional=True,
                  version_getter=_mayavi_version,
                  show_only=show_only)
    package_check('sympy',
                  INFO.SYMPY_MIN_VERSION,
                  optional=True,
                  messages={'opt suffix': '; some tests are going to fail!'},
                  show_only=show_only)
    package_check('igakit',
                  INFO.IGAKIT_MIN_VERSION,
                  optional=True,
                  version_getter=_igakit_version,
                  show_only=show_only)
    package_check('petsc4py',
                  INFO.PETSC4PY_MIN_VERSION,
                  optional=True,
                  show_only=show_only)
    package_check('mpi4py',
                  INFO.MPI4PY_MIN_VERSION,
                  optional=True,
                  show_only=show_only)
    package_check('slepc4py',
                  INFO.SLEPC4PY_MIN_VERSION,
                  optional=True,
                  show_only=show_only)
    package_check('pymetis',
                  INFO.PYMETIS_MIN_VERSION,
                  optional=True,
                  version_getter=_pymetis_version,
                  show_only=show_only)
    package_check('scikits.umfpack',
                  INFO.SCIKIT_UMFPACK_MIN_VERSION,
                  optional=True,
                  version_getter=_scikit_umfpack_version,
                  show_only=show_only)
    package_check('pysparse',
                  INFO.PYSPARSE_MIN_VERSION,
                  optional=True,
                  show_only=show_only)
示例#3
0

################################################################################
# Dependency check
################################################################################

def _mayavi_version(pkg_name):
    from enthought.mayavi import version
    return version.version

def _traits_version(pkg_name):
    from enthought.traits import version
    return version.__version__

# Check for core dependencies
package_check('numpy', INFO_VARS['numpy_min_version'])

################################################################################
################################################################################
# For some commands, use setuptools
if len(set(('develop', 'bdist_egg', 'bdist_rpm', 'bdist', 'bdist_dumb',
            'bdist_wininst', 'install_egg_info', 'egg_info', 'easy_install',
            )).intersection(sys.argv)) > 0:
    from setup_egg import extra_setuptools_args
    package_check('networkx', INFO_VARS['networkx_min_version'])
    package_check('enthought.mayavi', INFO_VARS['mayavi_min_version'],version_getter=_mayavi_version)
    package_check('enthought.traits', INFO_VARS['traits_min_version'],version_getter=_traits_version)

# extra_setuptools_args can be defined from the line above, but it can
# also be defined here because setup.py has been exec'ed from
# setup_egg.py.
示例#4
0
def check_versions(show_only=False):
    # Cython is a build dependency.
    package_check('cython', INFO.CYTHON_MIN_VERSION,
                  version_getter=_cython_version,
                  show_only=show_only)

    # Check hard and soft dependencies.
    package_check('numpy', INFO.NUMPY_MIN_VERSION,
                  show_only=show_only)
    package_check('scipy', INFO.SCIPY_MIN_VERSION,
                  show_only=show_only)
    package_check('matplotlib', INFO.MATPLOTLIB_MIN_VERSION,
                  show_only=show_only)
    package_check('pyparsing', INFO.PYPARSING_MIN_VERSION,
                  show_only=show_only)
    package_check('tables', INFO.PYTABLES_MIN_VERSION,
                  show_only=show_only)
    package_check(('enthought.mayavi', 'mayavi'),
                  INFO.MAYAVI_MIN_VERSION, optional=True,
                  version_getter=_mayavi_version,
                  show_only=show_only)
    package_check('sympy', INFO.SYMPY_MIN_VERSION, optional=True,
                  messages={'opt suffix' : '; some tests are going to fail!'},
                  show_only=show_only)
    package_check('igakit', INFO.IGAKIT_MIN_VERSION, optional=True,
                  version_getter=_igakit_version,
                  show_only=show_only)
    package_check('petsc4py', INFO.PETSC4PY_MIN_VERSION, optional=True,
                  show_only=show_only)
    package_check('mpi4py', INFO.MPI4PY_MIN_VERSION, optional=True,
                  show_only=show_only)
    package_check('pymetis', INFO.PYMETIS_MIN_VERSION, optional=True,
                  version_getter=_pymetis_version,
                  show_only=show_only)
示例#5
0
文件: setup.py 项目: rc/sfepy
def check_versions(show_only=False):
    # Cython is a build dependency.
    package_check("cython", INFO.CYTHON_MIN_VERSION, version_getter=_cython_version, show_only=show_only)

    # Check hard and soft dependencies.
    package_check("numpy", INFO.NUMPY_MIN_VERSION, show_only=show_only)
    package_check("scipy", INFO.SCIPY_MIN_VERSION, show_only=show_only)
    package_check("matplotlib", INFO.MATPLOTLIB_MIN_VERSION, show_only=show_only)
    package_check("pyparsing", INFO.PYPARSING_MIN_VERSION, show_only=show_only)
    package_check("tables", INFO.PYTABLES_MIN_VERSION, show_only=show_only)
    package_check(
        ("enthought.mayavi", "mayavi"),
        INFO.MAYAVI_MIN_VERSION,
        optional=True,
        version_getter=_mayavi_version,
        show_only=show_only,
    )
    package_check(
        "sympy",
        INFO.SYMPY_MIN_VERSION,
        optional=True,
        messages={"opt suffix": "; some tests are going to fail!"},
        show_only=show_only,
    )
    package_check("igakit", INFO.IGAKIT_MIN_VERSION, optional=True, version_getter=_igakit_version, show_only=show_only)
    package_check("petsc4py", INFO.PETSC4PY_MIN_VERSION, optional=True, show_only=show_only)
    package_check("mpi4py", INFO.MPI4PY_MIN_VERSION, optional=True, show_only=show_only)
    package_check(
        "pymetis", INFO.PYMETIS_MIN_VERSION, optional=True, version_getter=_pymetis_version, show_only=show_only
    )
    package_check(
        "scikits.umfpack",
        INFO.SCIKIT_UMFPACK_MIN_VERSION,
        optional=True,
        version_getter=_scikit_umfpack_version,
        show_only=show_only,
    )
    package_check("pysparse", INFO.PYSPARSE_MIN_VERSION, optional=True, show_only=show_only)
示例#6
0
文件: setup.py 项目: sdurve/sfepy
    try:
        from enthought.mayavi import version

    except:
        from mayavi import version

    return version.version


def _cython_version(pkg_name):
    from Cython.Compiler.Version import version
    return version


# Hard and soft dependency checking
package_check('numpy', INFO.NUMPY_MIN_VERSION)
package_check('scipy', INFO.SCIPY_MIN_VERSION)
package_check('matplotlib', INFO.MATPLOTLIB_MIN_VERSION)
package_check('pyparsing', INFO.PYPARSING_MIN_VERSION)
package_check('tables', INFO.PYTABLES_MIN_VERSION)
package_check('IPython',
              INFO.IPYTHON_MIN_VERSION,
              optional=True,
              messages={
                  'missing opt': '%s was not found: '
                  'isfepy will use regular Python shell',
                  'opt suffix': ''
              })
package_check(('enthought.mayavi', 'mayavi'),
              INFO.MAYAVI_MIN_VERSION,
              optional=True,
示例#7
0
文件: setup.py 项目: cindeem/nipy
# For some commands, use setuptools

if len(set(('develop', 'bdist_egg', 'bdist_rpm', 'bdist', 'bdist_dumb', 
            'bdist_wininst', 'install_egg_info', 'egg_info', 'easy_install',
            )).intersection(sys.argv)) > 0:
    from setup_egg import extra_setuptools_args

# extra_setuptools_args can be defined from the line above, but it can
# also be defined here because setup.py has been exec'ed from
# setup_egg.py.
if not 'extra_setuptools_args' in globals():
    extra_setuptools_args = dict()


# Hard and soft dependency checking
package_check('scipy', INFO_VARS['SCIPY_MIN_VERSION'])
package_check('sympy', INFO_VARS['SYMPY_MIN_VERSION'])
def _mayavi_version(pkg_name):
    from enthought.mayavi import version
    return version.version
package_check('mayavi',
              INFO_VARS['MAYAVI_MIN_VERSION'],
              optional=True,
              version_getter=_mayavi_version)
# Cython can be a build dependency
def _cython_version(pkg_name):
    from Cython.Compiler.Version import version
    return version
package_check('cython',
              INFO_VARS['CYTHON_MIN_VERSION'],
              optional=True,
示例#8
0
# Dependency check
################################################################################


def _mayavi_version(pkg_name):
    from mayavi import version
    return version.version


def _traits_version(pkg_name):
    from traits import version
    return version.__version__


# Check for core dependencies
package_check('numpy', INFO_VARS['numpy_min_version'])

################################################################################
################################################################################
# For some commands, use setuptools
if len(
        set((
            'develop',
            'bdist_egg',
            'bdist_rpm',
            'bdist',
            'bdist_dumb',
            'bdist_wininst',
            'install_egg_info',
            'egg_info',
            'easy_install',
示例#9
0
文件: setup.py 项目: cournape/nipy
# For some commands, use setuptools

if len(set(('develop', 'bdist_egg', 'bdist_rpm', 'bdist', 'bdist_dumb', 
            'bdist_wininst', 'install_egg_info', 'egg_info', 'easy_install',
            )).intersection(sys.argv)) > 0:
    from setup_egg import extra_setuptools_args

# extra_setuptools_args can be defined from the line above, but it can
# also be defined here because setup.py has been exec'ed from
# setup_egg.py.
if not 'extra_setuptools_args' in globals():
    extra_setuptools_args = dict()


# Hard and soft dependency checking
package_check('scipy', INFO_VARS['scipy_min_version'])
package_check('sympy', INFO_VARS['sympy_min_version'])
def _mayavi_version(pkg_name):
    from enthought.mayavi import version
    return version.version
package_check('mayavi',
              INFO_VARS['mayavi_min_version'],
              optional=True,
              version_getter=_mayavi_version)
# Cython can be a build dependency
def _cython_version(pkg_name):
    from Cython.Compiler.Version import version
    return version
package_check('cython',
              INFO_VARS['cython_min_version'],
              optional=True,