name = 'Python'
version = '2.7.9'

homepage = 'http://python.org/'
description = "Python is a programming language that lets you work more quickly and integrate your systems more effectively."

toolchain = {'name': 'CrayGNU', 'version': '2015.11'}
toolchainopts = {'pic': True, 'opt': True, 'optarch': True}

numpyversion = '1.9.1'
scipyversion = '0.14.1'

source_urls = ['http://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]

# python needs bzip2 to build the bz2 package
dependencies = [
    ('bzip2', '1.0.6'),
    ('zlib', '1.2.8'),
    ('libreadline', '6.3'),
    ('ncurses', '5.9'),
#   ('OpenSSL', '1.0.1k'),  # OS dependency should be preferred if the os version is more recent then this version, it's
#   nice to have an up to date openssl for security reasons
]

osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel'), 'tk-devel']

buildopts = 'LINKCC="$CC -dynamic"'

# order is important!
# package versions updated Jan 19th 2015
exts_list = [
    ('setuptools', '11.3.1', {
        'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'],
    }),
    ('pip', '6.0.6', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pip/'],
    }),
    ('nose', '1.3.4', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nose/'],
    }),
    ('numpy', numpyversion, {
        'source_urls': [('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download')],
        'patches': [
            'numpy-1.8.0-mkl.patch', # % numpyversion,
        ],
    }),
    ('scipy', scipyversion, {
        'source_urls': [('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download')],
    }),
    ('blist', '1.3.6', {
        'source_urls': ['https://pypi.python.org/packages/source/b/blist/'],
    }),
    ('mpi4py', '1.3.1', {
        'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'],
    }),
    ('paycheck', '1.0.2', {
        'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'],
    }),
    ('argparse', '1.2.1', {
        'source_urls': ['https://pypi.python.org/packages/source/a/argparse/'],
    }),
    ('lockfile', '0.10.2', {
        'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'],
    }),
    ('Cython', '0.21.2', {
        'source_urls': ['http://www.cython.org/release/'],
    }),
    ('six', '1.9.0', {
        'source_urls': ['https://pypi.python.org/packages/source/s/six/'],
    }),
    ('dateutil', '2.4.0', {
        'source_tmpl': 'python-%(name)s-%(version)s.tar.gz',
        'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'],
    }),
    ('deap', '1.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/d/deap/'],
    }),
    ('decorator', '3.4.0', {
        'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'],
    }),
    ('arff', '2.0.1', {
        'source_tmpl': 'liac-%(name)s-%(version)s.zip',
        'source_urls': ['https://pypi.python.org/packages/source/l/liac-arff/'],
    }),
    ('pycrypto', '2.6.1', {
        'modulename': 'Crypto',
        'source_urls': ['http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/'],
    }),
    ('ecdsa', '0.11', {
        'source_urls': ['https://pypi.python.org/packages/source/e/ecdsa/'],
    }),
    ('paramiko', '1.15.2', {
        'source_urls': ['https://pypi.python.org/packages/source/p/paramiko/'],
    }),
    ('pyparsing', '2.0.3', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pyparsing/'],
    }),
    ('netifaces', '0.10.4', {
        'source_urls': ['https://pypi.python.org/packages/source/n/netifaces'],
    }),
    ('netaddr', '0.7.13', {
        'source_urls': ['https://pypi.python.org/packages/source/n/netaddr'],
    }),
]

sanity_check_commands = [
    ('python', '--version'),
    ('python', '-c "import _ctypes"'),  # make sure that foreign function interface (libffi) works
    ('python', '-c "import _ssl"'),  # make sure SSL support is enabled one way or another
    ('python', '-c "import readline"'),  # make sure readline module is installed (requires libreadline)
    ('python', '-c "import Tkinter"'),  # make sure Tkinter module is installed (requires Tk)
]

moduleclass = 'lang'
