# IT4Innovations 2020

name = 'Python'
version = '3.7.5'
versionsuffix = '-base'

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

toolchain = {'name': 'GCC', 'version': '8.3.0-2.32'}
toolchainopts = {'pic': True}

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

dependencies = [
    ('bzip2', '1.0.8', '', True),  # required for bz2 package in Python stdlib
    ('zlib', '1.2.11', '', True),
    ('libreadline', '8.0', '', True),
    ('ncurses', '6.1', '', True),
    ('SQLite', '3.30.1', '', True),
    ('XZ', '5.2.4', '', True),
    ('GMP', '6.1.2', '', True),  # required for pycrypto
    ('libffi', '3.3', '', 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 requires OpenSSL >= 1.0.2, uncomment line below if OS version is too old (e.g. CentOS 6)
    # ('OpenSSL', '1.1.0j'),
]

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

# symlink 'pip' command to 'pip3' that is included with Python installation
# required so we can update pip to version included in extensions, using pip
installopts = " && ln -s %(installdir)s/bin/pip3 %(installdir)s/bin/pip"

#exts_default_options = {
#    'download_dep_fail': True,
#    'use_pip': True,
#}

# order is important!
# package versions updated Mar 15th 2019
exts_list = [
    ('pip', '19.3.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pip/'],
        # don't use --ignore-installed, i.e. let pip remove older pip version included with Python
        'pip_ignore_installed': False,
    }),
    ('setuptools', '44.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/s/setuptools'],
        'source_tmpl': '%(name)s-%(version)s.zip',
        # don't use --ignore-installed, i.e. let pip remove older setuptools version included with Python
        'pip_ignore_installed': False,
    }),
    ('wheel', '0.33.6', {
        'source_urls': ['https://pypi.python.org/packages/source/w/wheel'],
    })
]

moduleclass = 'lang'
