예제 #1
0
파일: setup.py 프로젝트: ofenlab/nibabel
    import setup_egg

from distutils.core import setup

# Python 2 to 3 build
from nisext.py3builder import build_py
# Commit hash writing, and dependency checking
from nisext.sexts import get_comrec_build, package_check
cmdclass = {'build_py': get_comrec_build('nibabel', build_py)}

# Get version and release info, which is all stored in nibabel/info.py
ver_file = os.path.join('nibabel', 'info.py')
exec(open(ver_file).read())

# Do dependency checking
package_check('numpy', NUMPY_MIN_VERSION)
custom_pydicom_messages = {
    'missing opt': 'Missing optional package "%s"'
    ' provided by package "pydicom"'
}
package_check('dicom',
              PYDICOM_MIN_VERSION,
              optional=True,
              messages=custom_pydicom_messages)
extra_setuptools_args = {}
if 'setuptools' in sys.modules:
    extra_setuptools_args = dict(tests_require=['nose'],
                                 test_suite='nose.collector',
                                 zip_safe=False,
                                 extras_require=dict(doc='Sphinx>=0.3',
                                                     test='nose>=0.10.1',
예제 #2
0
 def run(self):
     package_check('numpy', NUMPY_MIN_VERSION)
     package_check('scipy', SCIPY_MIN_VERSION)
     package_check('nibabel', NIBABEL_MIN_VERSION)
     install.install.run(self)
예제 #3
0
            '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('nipype', INFO_VARS['NIPYPE_MIN_VERSION'])

################################################################################
# Import the documentation building classes.

try:
    from build_docs import cmdclass
except ImportError:
    """ Pass by the doc build gracefully if sphinx is not installed """
    print "Sphinx is not installed, docs cannot be built"
    cmdclass = {}

################################################################################


def main(**extra_args):
예제 #4
0
파일: setup.py 프로젝트: mmuehlma/C-PAC
            '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('matplotlib', INFO_VARS['MATPLOTLIB_MIN_VERSION'])
package_check('jinja2', INFO_VARS['JINJA_MIN_VERSION'])
#package_check('lockfile', INFO_VARS['PYLOCKFILE_MIN_VERSION']) # checking doesn't really work
package_check('yaml', INFO_VARS['PYYAML_MIN_VERSION'])

################################################################################


def main(**extra_args):
    from numpy.distutils.core import setup
    from glob import glob

    # monkey-patch numpy distutils to use Cython instead of Pyrex
    from numpy.distutils.command.build_ext import build_ext
    from numpy.distutils.command.build_src import build_src
    from build_helpers import generate_a_pyrex_source
예제 #5
0
파일: setup.py 프로젝트: yanrui89/nibabel
# 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()

from nisext.sexts import get_comrec_build, package_check
cmdclass = {'build_py': get_comrec_build('nibabel')}

# Get version and release info, which is all stored in nibabel/info.py
ver_file = os.path.join('nibabel', 'info.py')
execfile(ver_file)

# Do dependency checking
package_check('numpy', NUMPY_MIN_VERSION)
package_check('dicom', PYDICOM_MIN_VERSION, optional=True)
if 'setuptools' in sys.modules:
    extra_setuptools_args['extras_require'] = dict(doc='Sphinx>=0.3',
                                                   test='nose>=0.10.1',
                                                   nicom='dicom>=' +
                                                   PYDICOM_MIN_VERSION)


def main(**extra_args):
    setup(
        name=NAME,
        maintainer=MAINTAINER,
        maintainer_email=MAINTAINER_EMAIL,
        description=DESCRIPTION,
        long_description=LONG_DESCRIPTION,
예제 #6
0
파일: setup.py 프로젝트: ofenlab/nipy
            '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('numpy', INFO_VARS['NUMPY_MIN_VERSION'])
package_check('scipy', INFO_VARS['SCIPY_MIN_VERSION'])
package_check('nibabel', INFO_VARS['NIBABEL_MIN_VERSION'])
package_check('sympy', INFO_VARS['SYMPY_MIN_VERSION'])


def _mayavi_version(pkg_name):
    """Mayavi2 pruned enthought. namespace at 4.0.0
    """
    v = ''
    try:
        from mayavi import version
        v = version.version
        if v == '':
            v = '4.0.0'  # must be the one in Debian
    except ImportError:
예제 #7
0
################################################################################
# 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('networkx', INFO_VARS['NETWORKX_MIN_VERSION'])
package_check('nibabel', INFO_VARS['NIBABEL_MIN_VERSION'])
package_check('numpy', INFO_VARS['NUMPY_MIN_VERSION'])
package_check('scipy', INFO_VARS['SCIPY_MIN_VERSION'])
package_check('traits', INFO_VARS['TRAITS_MIN_VERSION'])

################################################################################
# Import the documentation building classes.

try:
    from build_docs import cmdclass
except ImportError:
    """ Pass by the doc build gracefully if sphinx is not installed """
    print "Sphinx is not installed, docs cannot be built"
    cmdclass = {}