def setup_package():

    # Rewrite the version file every time

    write_version_py()
    cmdclass = {}

    # Figure out whether to add ``*_requires = ['numpy']``.
    # We don't want to do that unconditionally, because we risk updating
    # an installed numpy which fails too often.  Just if it's not installed, we
    # may give it a try.  See gh-3379.
    build_requires = []
    try:
        import numpy
        if (len(sys.argv) >= 2 and sys.argv[1] == 'bdist_wheel' and
                sys.platform == 'darwin'):
            # We're ony building wheels for platforms where we know there's
            # also a Numpy wheel, so do this unconditionally.  See gh-5184.
            build_requires = ['numpy>=1.7.1']
    except:
        build_requires = ['numpy>=1.7.1']

    metadata = dict(
        name="pyfunt",
        author="Daniele Ettore Ciriello",
        author_email="ciriello.daniele@gmail.com",
        version="0.1",
        license="MIT",
        url="https://github.com/dnlcrl/PyFunt",
        download_url="https://github.com/dnlcrl/PyFunt",
        description="Pythonic Deep Learning Framework",
        packages=['pyfunt', 'pyfunt/layers', 'pyfunt/utils'],
        cmdclass=cmdclass,  # {'build_ext': build_ext},
        platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
        setup_requires=build_requires,
        install_requires=required,
        # ext_modules=extensions,
        keywords='pyfunt deep learning artificial neural network convolution',
    )

    if len(sys.argv) >= 2 and ('--help' in sys.argv[1:] or
                               sys.argv[1] in ('--help-commands', 'egg_info', '--version',
                                               'clean')):
        # For these actions, NumPy is not required.
        #
        # They are required to succeed without Numpy for example when
        # pip is used to install Scipy when Numpy is not yet present in
        # the system.
        try:
            from setuptools import setup
        except __HOLE__:
            from distutils.core import setup
    else:
        if (len(sys.argv) >= 2 and sys.argv[1] in ('bdist_wheel', 'bdist_egg')) or (
                'develop' in sys.argv):
            # bdist_wheel/bdist_egg needs setuptools
            import setuptools

        from numpy.distutils.core import setup

        cwd = os.path.abspath(os.path.dirname(__file__))
        if not os.path.exists(os.path.join(cwd, 'PKG-INFO')):
            # Generate Cython sources, unless building from source release
            generate_cython()

        metadata['configuration'] = configuration

    print 'setup complete'
    setup(**metadata)
dataset/ETHPy150Open dnlcrl/PyFunt/setup.py/setup_package