Exemplo n.º 1
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))  # get cwd
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('pysal', os.path.join(src_path, 'pysal'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(name='PySAL',
          version=dversion,
          description="A library of spatial analysis functions.",
          long_description=long_description,
          maintainer="PySAL Developers",
          maintainer_email='*****@*****.**',
          url='http://pysal.org',
          license='BSD',
          test_suite='nose.collector',
          tests_require=['nose'],
          classifiers=[
              'Development Status :: 5 - Production/Stable',
              'Intended Audience :: Science/Research',
              'Intended Audience :: Developers',
              'Intended Audience :: Education',
              'Topic :: Scientific/Engineering',
              'Topic :: Scientific/Engineering :: GIS',
              'License :: OSI Approved :: BSD License',
              'Programming Language :: Python',
              'Programming Language :: Python :: 2.5',
              'Programming Language :: Python :: 2.6',
              'Programming Language :: Python :: 2.7'
          ],
          packages=find_packages(),
          package_data={'pysal': ['examples/*']},
          requires=['scipy'])
Exemplo n.º 2
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('numpy', os.path.join(src_path, 'numpy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # Rewrite the version file everytime
    write_version_py()

    # Run build
    from numpy.distutils.core import setup

    try:
        setup(
            name=NAME,
            maintainer=MAINTAINER,
            maintainer_email=MAINTAINER_EMAIL,
            description=DESCRIPTION,
            long_description=LONG_DESCRIPTION,
            url=URL,
            download_url=DOWNLOAD_URL,
            license=LICENSE,
            classifiers=CLASSIFIERS,
            author=AUTHOR,
            author_email=AUTHOR_EMAIL,
            platforms=PLATFORMS,
            configuration=configuration )
    finally:
        del sys.path[0]
        os.chdir(old_path)
    return
Exemplo n.º 3
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('numpy', os.path.join(src_path, 'numpy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # Rewrite the version file everytime
    write_version_py()

    # Run build
    from numpy.distutils.core import setup

    try:
        setup(
            name=NAME,
            maintainer=MAINTAINER,
            maintainer_email=MAINTAINER_EMAIL,
            description=DESCRIPTION,
            long_description=LONG_DESCRIPTION,
            url=URL,
            download_url=DOWNLOAD_URL,
            license=LICENSE,
            classifiers=CLASSIFIERS,
            author=AUTHOR,
            author_email=AUTHOR_EMAIL,
            platforms=PLATFORMS,
            configuration=configuration )
    finally:
        del sys.path[0]
        os.chdir(old_path)
    return
Exemplo n.º 4
0
def setup_package():

    from numpy.distutils.core import setup
    from numpy.distutils.misc_util import Configuration

    old_path = os.getcwd()
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('scipy', os.path.join(src_path, 'scipy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

    os.chdir(local_path)
    sys.path.insert(0, local_path)
    sys.path.insert(0, os.path.join(local_path, 'scipy'))  # to retrive version

    # Run build
    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # Rewrite the version file everytime
    if os.path.exists('scipy/version.py'): os.remove('scipy/version.py')
    write_version_py()

    try:
        setup(
            name='scipy',
            maintainer="SciPy Developers",
            maintainer_email="*****@*****.**",
            description=DOCLINES[0],
            long_description="\n".join(DOCLINES[2:]),
            url="http://www.scipy.org",
            download_url=
            "http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531",
            license='BSD',
            classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
            platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
            configuration=configuration)
    finally:
        del sys.path[0]
        os.chdir(old_path)

    return
Exemplo n.º 5
0
def setup_package():

    from numpy.distutils.core import setup
    from numpy.distutils.misc_util import Configuration

    old_path = os.getcwd()
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('scipy', os.path.join(src_path, 'scipy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

    os.chdir(local_path)
    sys.path.insert(0,local_path)
    sys.path.insert(0,os.path.join(local_path,'scipy')) # to retrive version

    # Run build
    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # Rewrite the version file everytime
    if os.path.exists('scipy/version.py'): os.remove('scipy/version.py')
    write_version_py()

    try:
        setup(
            name = 'scipy',
            maintainer = "SciPy Developers",
            maintainer_email = "*****@*****.**",
            description = DOCLINES[0],
            long_description = "\n".join(DOCLINES[2:]),
            url = "http://www.scipy.org",
            download_url = "http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531",
            license = 'BSD',
            classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
            platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
            configuration=configuration )
    finally:
        del sys.path[0]
        os.chdir(old_path)

    return
Exemplo n.º 6
0
def setup_package():

    # Rewrite the version file everytime
    if os.path.exists("numpy/version.py"):
        os.remove("numpy/version.py")
    write_version_py()

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, "build", "py3k")
        sys.path.insert(0, os.path.join(local_path, "tools"))
        import py3tool

        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3("numpy", os.path.join(src_path, "numpy"))

        site_cfg = os.path.join(local_path, "site.cfg")
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

    # Run build
    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    from numpy.distutils.core import setup

    try:
        setup(
            name=NAME,
            maintainer=MAINTAINER,
            maintainer_email=MAINTAINER_EMAIL,
            description=DESCRIPTION,
            long_description=LONG_DESCRIPTION,
            url=URL,
            download_url=DOWNLOAD_URL,
            license=LICENSE,
            classifiers=CLASSIFIERS,
            author=AUTHOR,
            author_email=AUTHOR_EMAIL,
            platforms=PLATFORMS,
            configuration=configuration,
        )
    finally:
        del sys.path[0]
        os.chdir(old_path)
    return
Exemplo n.º 7
0
def setup_package():

    # Rewrite the version file everytime
    if os.path.exists('numpy/version.py'): os.remove('numpy/version.py')
    write_version_py()

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('numpy', os.path.join(src_path, 'numpy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

    # Run build
    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    from numpy.distutils.core import setup

    try:
        setup(
            name=NAME,
            maintainer=MAINTAINER,
            maintainer_email=MAINTAINER_EMAIL,
            description=DESCRIPTION,
            long_description=LONG_DESCRIPTION,
            url=URL,
            download_url=DOWNLOAD_URL,
            license=LICENSE,
            classifiers=CLASSIFIERS,
            author=AUTHOR,
            author_email=AUTHOR_EMAIL,
            platforms=PLATFORMS,
            configuration=configuration )
    finally:
        del sys.path[0]
        os.chdir(old_path)
    return
Exemplo n.º 8
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('mdp', os.path.join(src_path, 'mdp'))
        py3tool.sync_2to3('bimdp', os.path.join(src_path, 'bimdp'))

    # check that we have a version
    version = get_version()
    short_description = get_short_description()
    long_description = get_long_description()
    # create download url:
    dl = ('http://sourceforge.net/projects/mdp-toolkit/files/mdp-toolkit/' +
          get_version() + '/MDP-' + get_version() + '.tar.gz')
    # Run build
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(name='MDP',
          version=version,
          author='MDP Developers',
          author_email=email,
          maintainer='MDP Developers',
          maintainer_email=email,
          license="http://mdp-toolkit.sourceforge.net/license.html",
          platforms=["Any"],
          url='http://mdp-toolkit.sourceforge.net',
          download_url=dl,
          description=short_description,
          long_description=long_description,
          classifiers=classifiers,
          packages=[
              'mdp', 'mdp.nodes', 'mdp.utils', 'mdp.hinet', 'mdp.test',
              'mdp.graph', 'mdp.caching', 'mdp.parallel', 'bimdp',
              'bimdp.hinet', 'bimdp.inspection', 'bimdp.nodes',
              'bimdp.parallel', 'bimdp.test'
          ],
          package_data={
              'mdp.hinet': ['hinet.css'],
              'mdp.utils': ['slideshow.css']
          })
Exemplo n.º 9
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('mdp', os.path.join(src_path, 'mdp'))
        py3tool.sync_2to3('bimdp', os.path.join(src_path, 'bimdp'))

    # check that we have a version
    version = get_version()
    short_description = get_short_description()
    long_description = get_long_description()
    # create download url:
    dl = ('http://sourceforge.net/projects/mdp-toolkit/files/mdp-toolkit/' +
          get_version()+'/MDP-'+get_version()+'.tar.gz')
    # Run build
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(name = 'MDP', version=version,
          author = 'MDP Developers',
          author_email = email,
          maintainer = 'MDP Developers',
          maintainer_email = email,
          license = "http://mdp-toolkit.sourceforge.net/license.html",
          platforms = ["Any"],
          url = 'http://mdp-toolkit.sourceforge.net',
          download_url = dl,
          description = short_description,
          long_description = long_description,
          classifiers = classifiers,
          packages = ['mdp', 'mdp.nodes', 'mdp.utils', 'mdp.hinet',
                      'mdp.test', 'mdp.graph', 'mdp.caching',
                      'mdp.parallel', 'bimdp', 'bimdp.hinet', 'bimdp.inspection',
                      'bimdp.nodes', 'bimdp.parallel', 'bimdp.test',
                      'mdp.gputheano'],
          package_data = {'mdp.hinet': ['hinet.css'],
                          'mdp.utils': ['slideshow.css']}
          )
Exemplo n.º 10
0
def setup_package():
    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('mvpa2', os.path.join(src_path, 'mvpa2'))
        py3tool.sync_2to3('3rd', os.path.join(src_path, '3rd'))

        # Borrowed from NumPy before this code was deprecated (everyone
        # else moved on from 2to3)
        # Ugly hack to make pip work with Python 3, see NumPy #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    # Run build
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(name='pymvpa2',
          version='2.6.5.dev1',
          author='Michael Hanke, Yaroslav Halchenko, Nikolaas N. Oosterhof',
          author_email='*****@*****.**',
          license='MIT License',
          url='http://www.pymvpa.org',
          description='Multivariate pattern analysis',
          long_description=
              "PyMVPA is a Python module intended to ease pattern classification "
              "analyses of large datasets. It provides high-level abstraction of "
              "typical processing steps and a number of implementations of some "
              "popular algorithms. While it is not limited to neuroimaging data "
              "it is eminently suited for such datasets.\n"
              "PyMVPA is truly free software (in every respect) and "
              "additionally requires nothing but free-software to run.",
          setup_requires=['numpy'],
          # please maintain alphanumeric order
          packages=[ 'mvpa2',
                     'mvpa2.algorithms',
                     'mvpa2.algorithms.benchmarks',
                     'mvpa2.atlases',
                     'mvpa2.base',
                     'mvpa2.clfs',
                     'mvpa2.clfs.libsmlrc',
                     'mvpa2.clfs.libsvmc',
                     'mvpa2.clfs.skl',
                     'mvpa2.clfs.sg',
                     'mvpa2.cmdline',
                     'mvpa2.datasets',
                     'mvpa2.datasets.sources',
                     'mvpa2.featsel',
                     'mvpa2.kernels',
                     'mvpa2.mappers',
                     'mvpa2.mappers.glm',
                     'mvpa2.generators',
                     'mvpa2.measures',
                     'mvpa2.misc',
                     'mvpa2.misc.bv',
                     'mvpa2.misc.fsl',
                     'mvpa2.misc.io',
                     'mvpa2.misc.plot',
                     'mvpa2.misc.surfing',
                     'mvpa2.sandbox',
                     'mvpa2.support',
                     'mvpa2.support.afni',
                     'mvpa2.support.bayes',
                     'mvpa2.support.nipy',
                     'mvpa2.support.ipython',
                     'mvpa2.support.nibabel',
                     'mvpa2.support.scipy',
                     'mvpa2.testing',
                     'mvpa2.tests',
                     'mvpa2.tests.badexternals',
                     'mvpa2.viz',
                   ],
          install_requires=requires['core'],
          data_files=[('mvpa2', [os.path.join('mvpa2', 'COMMIT_HASH')])]
                     + find_data_files(os.path.join('mvpa2', 'data'),
                                       '*.txt', '*.nii.gz', '*.rtc', 'README', '*.bin',
                                       '*.dat', '*.dat.gz', '*.mat', '*.fsf', '*.par'),
          scripts=glob.glob(os.path.join('bin', '*')),
          ext_modules=ext_modules
          )
Exemplo n.º 11
0
def setup_package():
    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('mvpa2', os.path.join(src_path, 'mvpa2'))
        py3tool.sync_2to3('3rd', os.path.join(src_path, '3rd'))

    # Run build
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(name='pymvpa2',
          version='2.3.0',
          author='Michael Hanke, Yaroslav Halchenko, Per B. Sederberg',
          author_email='*****@*****.**',
          license='MIT License',
          url='http://www.pymvpa.org',
          description='Multivariate pattern analysis',
          long_description=\
              "PyMVPA is a Python module intended to ease pattern classification " \
              "analyses of large datasets. It provides high-level abstraction of " \
              "typical processing steps and a number of implementations of some " \
              "popular algorithms. While it is not limited to neuroimaging data " \
              "it is eminently suited for such datasets.\n" \
              "PyMVPA is truly free software (in every respect) and " \
              "additionally requires nothing but free-software to run.",
          # please maintain alphanumeric order
          packages=[ 'mvpa2',
                           'mvpa2.algorithms',
                           'mvpa2.atlases',
                           'mvpa2.base',
                           'mvpa2.clfs',
                           'mvpa2.clfs.libsmlrc',
                           'mvpa2.clfs.libsvmc',
                           'mvpa2.clfs.skl',
                           'mvpa2.clfs.sg',
                           'mvpa2.cmdline',
                           'mvpa2.datasets',
                           'mvpa2.datasets.sources',
                           'mvpa2.featsel',
                           'mvpa2.kernels',
                           'mvpa2.mappers',
                           'mvpa2.mappers.glm',
                           'mvpa2.generators',
                           'mvpa2.measures',
                           'mvpa2.misc',
                           'mvpa2.misc.bv',
                           'mvpa2.misc.fsl',
                           'mvpa2.misc.io',
                           'mvpa2.misc.plot',
                           'mvpa2.misc.surfing',
                           'mvpa2.sandbox',
                           'mvpa2.support',
                           'mvpa2.support.afni',
                           'mvpa2.support.bayes',
                           'mvpa2.support.nipy',
                           'mvpa2.support.ipython',
                           'mvpa2.support.nibabel',
                           'mvpa2.support.scipy',
                           'mvpa2.testing',
                           'mvpa2.tests',
                           'mvpa2.tests.badexternals',
                           'mvpa2.viz',
                           ],
          data_files=[('mvpa2', ['mvpa2/COMMIT_HASH']),
                        get_full_dir('mvpa2/data'),
                        get_full_dir('mvpa2/data/bv'),
                        get_full_dir('mvpa2/data/tutorial_data_25mm/data'),
          ],
          scripts=glob(os.path.join('bin', '*')),
          ext_modules=ext_modules
          )
Exemplo n.º 12
0
def setup_package():
    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, "build", "py3k")
        import py3tool

        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3("mvpa2", os.path.join(src_path, "mvpa2"))
        py3tool.sync_2to3("3rd", os.path.join(src_path, "3rd"))

    # Run build
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(
        name="pymvpa2",
        version="2.2.0",
        author="Michael Hanke, Yaroslav Halchenko, Per B. Sederberg",
        author_email="*****@*****.**",
        license="MIT License",
        url="http://www.pymvpa.org",
        description="Multivariate pattern analysis",
        long_description="PyMVPA is a Python module intended to ease pattern classification "
        "analyses of large datasets. It provides high-level abstraction of "
        "typical processing steps and a number of implementations of some "
        "popular algorithms. While it is not limited to neuroimaging data "
        "it is eminently suited for such datasets.\n"
        "PyMVPA is truly free software (in every respect) and "
        "additionally requires nothing but free-software to run.",
        # please maintain alphanumeric order
        packages=[
            "mvpa2",
            "mvpa2.algorithms",
            "mvpa2.atlases",
            "mvpa2.base",
            "mvpa2.clfs",
            "mvpa2.clfs.libsmlrc",
            "mvpa2.clfs.libsvmc",
            "mvpa2.clfs.skl",
            "mvpa2.clfs.sg",
            "mvpa2.datasets",
            "mvpa2.datasets.sources",
            "mvpa2.featsel",
            "mvpa2.kernels",
            "mvpa2.mappers",
            "mvpa2.generators",
            "mvpa2.measures",
            "mvpa2.misc",
            "mvpa2.misc.bv",
            "mvpa2.misc.fsl",
            "mvpa2.misc.io",
            "mvpa2.misc.plot",
            "mvpa2.sandbox",
            "mvpa2.support",
            "mvpa2.support.bayes",
            "mvpa2.support.nipy",
            "mvpa2.support.ipython",
            "mvpa2.testing",
            "mvpa2.tests",
            "mvpa2.tests.badexternals",
        ],
        data_files=[
            ("mvpa2", ["mvpa2/COMMIT_HASH"]),
            ("mvpa2/data", [f for f in glob(os.path.join("mvpa2", "data", "*")) if os.path.isfile(f)]),
            ("mvpa2/data/bv", [f for f in glob(os.path.join("mvpa2", "data", "bv", "*")) if os.path.isfile(f)]),
        ],
        scripts=glob(os.path.join("bin", "*")),
        ext_modules=ext_modules,
    )
Exemplo n.º 13
0
def setup_package():
    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('mvpa2', os.path.join(src_path, 'mvpa2'))
        py3tool.sync_2to3('3rd', os.path.join(src_path, '3rd'))

    # Run build
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(name='pymvpa2',
          version='2.4.0',
          author='Michael Hanke, Yaroslav Halchenko, Per B. Sederberg',
          author_email='*****@*****.**',
          license='MIT License',
          url='http://www.pymvpa.org',
          description='Multivariate pattern analysis',
          long_description=
              "PyMVPA is a Python module intended to ease pattern classification "
              "analyses of large datasets. It provides high-level abstraction of "
              "typical processing steps and a number of implementations of some "
              "popular algorithms. While it is not limited to neuroimaging data "
              "it is eminently suited for such datasets.\n"
              "PyMVPA is truly free software (in every respect) and "
              "additionally requires nothing but free-software to run.",
          # please maintain alphanumeric order
          packages=[ 'mvpa2',
                     'mvpa2.algorithms',
                     'mvpa2.atlases',
                     'mvpa2.base',
                     'mvpa2.clfs',
                     'mvpa2.clfs.libsmlrc',
                     'mvpa2.clfs.libsvmc',
                     'mvpa2.clfs.skl',
                     'mvpa2.clfs.sg',
                     'mvpa2.cmdline',
                     'mvpa2.datasets',
                     'mvpa2.datasets.sources',
                     'mvpa2.featsel',
                     'mvpa2.kernels',
                     'mvpa2.mappers',
                     'mvpa2.mappers.glm',
                     'mvpa2.generators',
                     'mvpa2.measures',
                     'mvpa2.misc',
                     'mvpa2.misc.bv',
                     'mvpa2.misc.fsl',
                     'mvpa2.misc.io',
                     'mvpa2.misc.plot',
                     'mvpa2.misc.surfing',
                     'mvpa2.sandbox',
                     'mvpa2.support',
                     'mvpa2.support.afni',
                     'mvpa2.support.bayes',
                     'mvpa2.support.nipy',
                     'mvpa2.support.ipython',
                     'mvpa2.support.nibabel',
                     'mvpa2.support.scipy',
                     'mvpa2.testing',
                     'mvpa2.tests',
                     'mvpa2.tests.badexternals',
                     'mvpa2.viz',
                   ],
          data_files=[('mvpa2', [os.path.join('mvpa2', 'COMMIT_HASH')])]
                     + find_data_files(os.path.join('mvpa2', 'data'),
                                       '*.txt', '*.nii.gz', '*.rtc', 'README', '*.bin',
                                       '*.dat', '*.dat.gz', '*.mat', '*.fsf', '*.par'),
          scripts=glob.glob(os.path.join('bin', '*')),
          ext_modules=ext_modules
          )
Exemplo n.º 14
0
def setup_package():
    from numpy.distutils.core import setup

    old_path = os.getcwd()
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('scipy', os.path.join(src_path, 'scipy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.

        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    os.chdir(local_path)
    sys.path.insert(0, local_path)
    sys.path.insert(0, os.path.join(local_path, 'scipy'))  # to retrieve version

    # Run build
    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # Rewrite the version file everytime
    write_version_py()

    try:
        setup(
            name = 'scipy',
            maintainer = "SciPy Developers",
            maintainer_email = "*****@*****.**",
            description = DOCLINES[0],
            long_description = "\n".join(DOCLINES[2:]),
            url = "http://www.scipy.org",
            download_url = "http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531",
            license = 'BSD',
            classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
            platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
            configuration=configuration )
    finally:
        del sys.path[0]
        os.chdir(old_path)

    return
Exemplo n.º 15
0
def setup_package():
    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path
    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('mvpa2', os.path.join(src_path, 'mvpa2'))
        py3tool.sync_2to3('3rd', os.path.join(src_path, '3rd'))

        # Borrowed from NumPy before this code was deprecated (everyone
        # else moved on from 2to3)
        # Ugly hack to make pip work with Python 3, see NumPy #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    # Run build
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(
        name='pymvpa2',
        version='2.6.1',
        author='Michael Hanke, Yaroslav Halchenko, Nikolaas N. Oosterhof',
        author_email='*****@*****.**',
        license='MIT License',
        url='http://www.pymvpa.org',
        description='Multivariate pattern analysis',
        long_description=
        "PyMVPA is a Python module intended to ease pattern classification "
        "analyses of large datasets. It provides high-level abstraction of "
        "typical processing steps and a number of implementations of some "
        "popular algorithms. While it is not limited to neuroimaging data "
        "it is eminently suited for such datasets.\n"
        "PyMVPA is truly free software (in every respect) and "
        "additionally requires nothing but free-software to run.",
        setup_requires=['numpy'],
        # please maintain alphanumeric order
        packages=[
            'mvpa2',
            'mvpa2.algorithms',
            'mvpa2.algorithms.benchmarks',
            'mvpa2.atlases',
            'mvpa2.base',
            'mvpa2.clfs',
            'mvpa2.clfs.libsmlrc',
            'mvpa2.clfs.libsvmc',
            'mvpa2.clfs.skl',
            'mvpa2.clfs.sg',
            'mvpa2.cmdline',
            'mvpa2.datasets',
            'mvpa2.datasets.sources',
            'mvpa2.featsel',
            'mvpa2.kernels',
            'mvpa2.mappers',
            'mvpa2.mappers.glm',
            'mvpa2.generators',
            'mvpa2.measures',
            'mvpa2.misc',
            'mvpa2.misc.bv',
            'mvpa2.misc.fsl',
            'mvpa2.misc.io',
            'mvpa2.misc.plot',
            'mvpa2.misc.surfing',
            'mvpa2.sandbox',
            'mvpa2.support',
            'mvpa2.support.afni',
            'mvpa2.support.bayes',
            'mvpa2.support.nipy',
            'mvpa2.support.ipython',
            'mvpa2.support.nibabel',
            'mvpa2.support.scipy',
            'mvpa2.testing',
            'mvpa2.tests',
            'mvpa2.tests.badexternals',
            'mvpa2.viz',
        ],
        install_requires=requires['core'],
        data_files=[('mvpa2', [os.path.join('mvpa2', 'COMMIT_HASH')])] +
        find_data_files(os.path.join(
            'mvpa2', 'data'), '*.txt', '*.nii.gz', '*.rtc', 'README', '*.bin',
                        '*.dat', '*.dat.gz', '*.mat', '*.fsf', '*.par'),
        scripts=glob.glob(os.path.join('bin', '*')),
        ext_modules=ext_modules)
Exemplo n.º 16
0
import os
import sys
import shutil

import setuptools
from distutils.core \
    import \
        setup

if sys.version_info >= (3, ):
    local_path = os.path.dirname(__file__)
    src_path = os.path.join(local_path, 'build', 'py3k')
    sys.path.insert(0, os.path.join(local_path, 'tools'))
    import py3tool
    print("Converting to Python3 via 2to3...")
    py3tool.sync_2to3('yaku', os.path.join(src_path, 'yaku'))

setup(
    name="yaku",
    description="A simple build system in python to build python extensions",
    long_description=open("README").read(),
    version="0.0.1",
    author="David Cournapeau",
    author_email="*****@*****.**",
    license="BSD",
    packages=["yaku.tools", "yaku", "yaku.compat"],
)
Exemplo n.º 17
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))  # get cwd
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('pysal', os.path.join(src_path, 'pysal'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)


    # get all file endings and copy whole file names without a file suffix
    # assumes nested directories are only down one level
    example_data_files = set()
    for i in os.listdir("pysal/examples"):
        if i.endswith(('py', 'pyc')):
            continue
        if not os.path.isdir("pysal/examples/" + i):
            if "." in i:
                glob_name = "examples/*." + i.split(".")[-1]
            else:
                glob_name = "examples/" + i
        else:
            glob_name = "examples/" + i + "/*"

        example_data_files.add(glob_name)

    setup(
        name='PySAL',
        version=dversion,
        description="A library of spatial analysis functions.",
        long_description=long_description,
        maintainer="PySAL Developers",
        maintainer_email='*****@*****.**',
        url='http://pysal.org',
        download_url='https://pypi.python.org/pypi/PySAL',
        license='BSD',
        test_suite='nose.collector',
        tests_require=['nose'],
        keywords='spatial statistics',
        classifiers=[
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Science/Research',
            'Intended Audience :: Developers',
            'Intended Audience :: Education',
            'Topic :: Scientific/Engineering',
            'Topic :: Scientific/Engineering :: GIS',
            'License :: OSI Approved :: BSD License',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2.5',
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7'
        ],
        packages=find_packages(exclude=["*.network", "*.network.*", "network.*", "network"]),
        package_data={'pysal': list(example_data_files)},
        requires=['scipy']
    )
Exemplo n.º 18
0
import os
import sys
import shutil

import setuptools
from distutils.core \
    import \
        setup

if sys.version_info >= (3,):
    local_path = os.path.dirname(__file__)
    src_path = os.path.join(local_path, 'build', 'py3k')
    sys.path.insert(0, os.path.join(local_path, 'tools'))
    import py3tool
    print("Converting to Python3 via 2to3...")
    py3tool.sync_2to3('yaku', os.path.join(src_path, 'yaku'))

setup(name="yaku",
    description="A simple build system in python to build python extensions",
    long_description=open("README").read(),
    version="0.0.1",
    author="David Cournapeau",
    author_email="*****@*****.**",
    license="BSD",
    packages=["yaku.tools", "yaku", "yaku.compat"],
)
Exemplo n.º 19
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))  # get cwd
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('pysal', os.path.join(src_path, 'pysal'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # get all file endings and copy whole file names without a file suffix
    # assumes nested directories are only down one level
    example_data_files = set()
    for i in os.listdir("pysal/examples"):
        if i.endswith(('py', 'pyc')):
            continue
        if not os.path.isdir("pysal/examples/" + i):
            if "." in i:
                glob_name = "examples/*." + i.split(".")[-1]
            else:
                glob_name = "examples/" + i
        else:
            glob_name = "examples/" + i + "/*"

        example_data_files.add(glob_name)

    setup(name='PySAL',
          version=dversion,
          description="A library of spatial analysis functions.",
          long_description=long_description,
          maintainer="PySAL Developers",
          maintainer_email='*****@*****.**',
          url='http://pysal.org',
          download_url='https://pypi.python.org/pypi/PySAL',
          license='BSD',
          py_modules=['pysal'],
          test_suite='nose.collector',
          tests_require=['nose'],
          keywords='spatial statistics',
          classifiers=[
              'Development Status :: 5 - Production/Stable',
              'Intended Audience :: Science/Research',
              'Intended Audience :: Developers',
              'Intended Audience :: Education',
              'Topic :: Scientific/Engineering',
              'Topic :: Scientific/Engineering :: GIS',
              'License :: OSI Approved :: BSD License',
              'Programming Language :: Python',
              'Programming Language :: Python :: 2.5',
              'Programming Language :: Python :: 2.6',
              'Programming Language :: Python :: 2.7'
          ],
          packages=find_packages(exclude=[
              "*.network", "*.network.*", "network.*", "network", ".meta",
              "*.meta.*", "meta.*", "meta"
          ]),
          package_data={'pysal': list(example_data_files)},
          requires=['scipy'])
Exemplo n.º 20
0
def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))  # get cwd
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('pysal', os.path.join(src_path, 'pysal'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    setup(
        name='PySAL',
        version=dversion,
        description="A library of spatial analysis functions.",
        long_description=long_description,
        maintainer="PySAL Developers",
        maintainer_email='*****@*****.**',
        url='http://pysal.org',
        license='BSD',
        test_suite='nose.collector',
        tests_require=['nose'],
        classifiers=[
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Science/Research',
            'Intended Audience :: Developers',
            'Intended Audience :: Education',
            'Topic :: Scientific/Engineering',
            'Topic :: Scientific/Engineering :: GIS',
            'License :: OSI Approved :: BSD License',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2.5',
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7'
        ],
        packages=find_packages(),
        package_data={'pysal': ['examples/*']},
        requires=['scipy']
    )