# JH 2020

name = 'Python'
version = '3.6.6'

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

toolchain = {'name': 'foss', 'version': '2018a'}
toolchainopts = {'pic': True}

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

# python needs bzip2 to build the bz2 package
dependencies = [
    ('bzip2', '1.0.6', '', True),
    ('zlib', '1.2.11', '', True),
    ('libreadline', '7.0', '', True),
    ('ncurses', '6.1', '', True),
    ('SQLite', '3.24.0', '', True),
    ('XZ', '5.2.4', '', True),
    ('mkl', '2018.1.163', '', True),
    ('GMP', '6.1.2', '', True),  # required for pycrypto
    ('libffi', '3.2.1', '', True),  # required for cryptography
    # 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;
    # Python 3.7.0 requires OpenSSL >= 1.0.2, uncomment line below if OS version is too old (e.g. CentOS 6)
    # ('OpenSSL', '1.1.0h'),
]

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

# Try to make sure stack limit is set to unlimited, to avoid compilation errors for hashlib with Intel compilers
# cfr. https://github.com/easybuilders/easybuild-easyconfigs/issues/6484
ulimit_unlimited = True

exts_download_dep_fail = True

# workaround for "undefined symbol: __stack_chk_guard"
# see also https://software.intel.com/en-us/forums/intel-c-compiler/topic/610514
buildopts = 'LDFLAGS="$LDFLAGS -lssp"'

# order is important!
# package versions updated August 15th 2018
exts_list = [
    ('setuptools', '40.0.0', {
        'source_tmpl': '%(name)s-%(version)s.zip',
        'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'],
        'checksums': ['012adb8e25fbfd64c652e99e7bab58799a3aaf05d39ab38561f69190a909015f'],
    }),
    ('pip', '18.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pip/'],
        'checksums': ['a0e11645ee37c90b40c46d607070c4fd583e2cd46231b1c06e389c5e814eed76'],
    }),
    ('nose', '1.3.7', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nose/'],
        'checksums': ['f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98'],
    }),
    ('numpy', '1.15.0', {
        'source_tmpl': '%(name)s-%(version)s.zip',
        'source_urls': ['https://pypi.python.org/packages/source/n/numpy/'],
        'checksums': ['f28e73cf18d37a413f7d5de35d024e6b98f14566a10d82100f9dc491a7d449f9'],
    }),
    ('scipy', '1.1.0', {
        'source_urls': ['https://pypi.python.org/packages/source/s/scipy/'],
        'checksums': ['878352408424dffaa695ffedf2f9f92844e116686923ed9aa8626fc30d32cfd1'],
    }),
    ('blist', '1.3.6', {
        'source_urls': ['https://pypi.python.org/packages/source/b/blist/'],
        'checksums': ['3a12c450b001bdf895b30ae818d4d6d3f1552096b8c995f0fe0c74bef04d1fc3'],
    }),
    ('mpi4py', '3.0.0', {
        'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'],
        'checksums': ['b457b02d85bdd9a4775a097fac5234a20397b43e073f14d9e29b6cd78c68efd7'],
    }),
    ('paycheck', '1.0.2', {
        'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'],
        'patches': ['paycheck-1.0.2_setup-open-README-utf8.patch'],
        'checksums': [
            '6db7fc367c146cd59d2327ad4d2d6b0a24bc1be2d6953bb0773cbf702ee1ed34',  # paycheck-1.0.2.tar.gz
            # paycheck-1.0.2_setup-open-README-utf8.patch
            'ceb7f08aebf016cdcd94ae41c1c76c8c120907f85cbfce240d3a112afb264d79',
        ],
    }),
    ('pbr', '4.2.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'],
        'checksums': ['1b8be50d938c9bb75d0eaf7eda111eec1bf6dc88a62a6412e33bf077457e0f45'],
    }),
    ('Cython', '0.28.5', {
        'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'],
        'checksums': ['b64575241f64f6ec005a4d4137339fb0ba5e156e826db2fdb5f458060d9979e0'],
    }),
    ('six', '1.11.0', {
        'source_urls': ['https://pypi.python.org/packages/source/s/six/'],
        'checksums': ['70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9'],
    }),
    ('setuptools_scm', '3.2.0', {
        'source_urls': ['https://pypi.python.org/packages/source/s/setuptools_scm/'],
        'checksums': ['52ab47715fa0fc7d8e6cd15168d1a69ba995feb1505131c3e814eb7087b57358'],
    }),
    ('python-dateutil', '2.7.3', {
        'modulename': 'dateutil',
        'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'],
        'checksums': ['e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8'],
    }),
    ('deap', '1.2.2', {
        'source_urls': ['https://pypi.python.org/packages/source/d/deap/'],
        'checksums': ['95c63e66d755ec206c80fdb2908851c0bef420ee8651ad7be4f0578e9e909bcf'],
    }),
    ('decorator', '4.3.0', {
        'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'],
        'checksums': ['c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c'],
    }),
    ('liac-arff', '2.3', {
        'modulename': 'arff',
        'source_urls': ['https://pypi.python.org/packages/source/l/liac-arff/'],
        'checksums': ['21b1b17c082cacd7b554bf9a42f6de61d2bf02feef6eb31ec36b5486c31b2ae9'],
    }),
    ('pycrypto', '2.6.1', {
        'modulename': 'Crypto',
        'source_urls': ['https://pypi.python.org/packages/source/p/pycrypto/'],
        'checksums': ['f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c'],
    }),
    ('ecdsa', '0.13', {
        'source_urls': ['https://pypi.python.org/packages/source/e/ecdsa/'],
        'checksums': ['64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa'],
    }),
    ('pycparser', '2.18', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pycparser/'],
        'checksums': ['99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226'],
    }),
    ('cffi', '1.11.5', {
        'source_urls': ['https://pypi.python.org/packages/source/c/cffi/'],
        'checksums': ['e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4'],
    }),
    ('asn1crypto', '0.24.0', {
        'source_urls': ['https://pypi.python.org/packages/source/a/asn1crypto/'],
        'checksums': ['9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49'],
    }),
    ('idna', '2.7', {
        'source_urls': ['https://pypi.python.org/packages/source/i/idna/'],
        'checksums': ['684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16'],
    }),
    ('cryptography', '2.3.1', {
        'source_urls': ['https://pypi.python.org/packages/source/c/cryptography/'],
        'checksums': ['8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6'],
    }),
    ('pyasn1', '0.4.4', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pyasn1/'],
        'checksums': ['f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137'],
    }),
    ('PyNaCl', '1.2.1', {
        'modulename': 'nacl',
        'source_urls': ['https://pypi.python.org/packages/source/p/pynacl/'],
        'checksums': ['e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9'],
    }),
    ('bcrypt', '3.1.4', {
        'source_urls': ['https://pypi.python.org/packages/source/b/bcrypt/'],
        'checksums': ['67ed1a374c9155ec0840214ce804616de49c3df9c5bc66740687c1c9b1cd9e8d'],
    }),
    ('paramiko', '2.4.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/paramiko/'],
        'checksums': ['33e36775a6c71790ba7692a73f948b329cf9295a72b0102144b031114bd2a4f3'],
    }),
    ('pyparsing', '2.2.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pyparsing/'],
        'checksums': ['0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04'],
    }),
    ('netifaces', '0.10.7', {
        'source_urls': ['https://pypi.python.org/packages/source/n/netifaces/'],
        'checksums': ['bd590fcb75421537d4149825e1e63cca225fd47dad861710c46bd1cb329d8cbd'],
    }),
    ('netaddr', '0.7.19', {
        'source_urls': ['https://pypi.python.org/packages/source/n/netaddr/'],
        'checksums': ['38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd'],
    }),
    ('mock', '2.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/m/mock/'],
        'checksums': ['b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba'],
    }),
    ('pytz', '2018.5', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pytz/'],
        'checksums': ['ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277'],
    }),
    ('pandas', '0.23.4', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pandas/'],
        'checksums': ['5b24ca47acf69222e82530e89111dd9d14f9b970ab2cd3a1c2c78f0c4fbba4f4'],
    }),
    ('bitstring', '3.1.5', {
        'source_tmpl': '%(name)s-%(version)s.zip',
        'source_urls': ['https://pypi.python.org/packages/source/b/bitstring/'],
        'checksums': ['c163a86fcef377c314690051885d86b47419e3e1770990c212e16723c1c08faa'],
    }),
    ('virtualenv', '16.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/v/virtualenv/'],
        'checksums': ['ca07b4c0b54e14a91af9f34d0919790b016923d157afda5efdde55c96718f752'],
    }),
    ('docopt', '0.6.2', {
        'source_urls': ['https://pypi.python.org/packages/source/d/docopt/'],
        'checksums': ['49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491'],
    }),
    ('joblib', '0.12.2', {
        'source_urls': ['https://pypi.python.org/packages/source/j/joblib/'],
        'checksums': ['e9f04885cf11704669f3a731ea6ac00bbc7dea16137aa4394ef7c272cdb9d008'],
    }),
    ('chardet', '3.0.4', {
        'source_urls': ['https://pypi.python.org/packages/source/c/chardet/'],
        'checksums': ['84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae'],
    }),
    ('certifi', '2018.8.13', {
        'source_urls': ['https://pypi.python.org/packages/source/c/certifi/'],
        'checksums': ['4c1d68a1408dd090d2f3a869aa94c3947cc1d967821d1ed303208c9f41f0f2f4'],
    }),
    ('urllib3', '1.23', {
        'source_urls': ['https://pypi.python.org/packages/source/u/urllib3/'],
        'checksums': ['a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf'],
    }),
    ('requests', '2.19.1', {
        'source_urls': ['https://pypi.python.org/packages/source/r/requests/'],
        'checksums': ['ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a'],
    }),
    ('xlrd', '1.1.0', {
        'source_urls': ['https://pypi.python.org/packages/source/x/xlrd'],
        'checksums': ['8a21885513e6d915fe33a8ee5fdfa675433b61405ba13e2a69e62ee36828d7e2'],
    }),
    ('py_expression_eval', '0.3.4', {
        'source_urls': ['https://pypi.python.org/packages/source/p/py_expression_eval'],
        'checksums': ['b9662c58f8835f6fa3380990f870429fe1176008718a47ce054a7867c4091ad8'],
    }),
    ('mpmath', '1.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/m/mpmath'],
        'checksums': ['04d14803b6875fe6d69e6dccea87d5ae5599802e4b1df7997bddd2024001050c'],
    }),
    ('tabulate', '0.8.2', {
        'source_urls': ['https://pypi.python.org/packages/source/t/tabulate/'],
        'checksums': ['e4ca13f26d0a6be2a2915428dc21e732f1e44dad7f76d7030b2ef1ec251cf7f2'],
    }),
    ('ujson', '1.35', {
        'source_urls': ['https://pypi.python.org/packages/source/u/ujson'],
        'checksums': ['f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86'],
    }),
]

moduleclass = 'lang'
