Minimal Python setup.py with prerequisites

python setup.py develop 

can easily and quickly install complicated lists of prerequisites. Here’s an example–we don’t use requirements.txt. This method works on Python 2.7 and Python 3.

Classifiers must be from this official classifiers list or they will fail when uploading your package to PyPi

    #!/usr/bin/env python
    req=['python-dateutil','pytz','nose','xarray','matplotlib','seaborn']
    # %%
    try:
        import conda.cli
        conda.cli.main('install',*req)
    except Exception as e:
        import pip
        pip.main(['install'] + req)
    # %%
    import setuptools #enables develop
    from numpy.distutils.core import setup,Extension

    setup(name='joesprog',
          packages=['joesprog'],
          author='Joe Smith',
          description='My awesome program prints cool messages.',
          version='1.0',
          url='https://github.com/joe/joesprog',
          classifiers=[
          'Intended Audience :: Science/Research',
          'Development Status :: 4 - Beta',
          'License :: OSI Approved :: MIT License',
          'Topic :: Scientific/Engineering
          'Programming Language :: Python :: 3',
          ],
          )

setup.py with f2py

Python can easily import Fortran code using f2py. See this f2py setup.py example/.