name = 'Python'
version = '2.7.13'
versionsuffix = '-bare'

homepage = 'http://python.org/'

description = """
 Python is a programming language that lets you work more quickly and
 integrate your systems more effectively.

Note: This module is meant to provide a builddependency for other Python
      modules while using EasyBuild's --minimaltoolchain option.  Modules
      built with it will require the full Python later
"""

toolchain = {'name': 'GCCcore', 'version': '6.4.0'}
toolchainopts = {'pic': True}

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

builddependencies = [
    ('binutils', '2.28'),
]

dependencies = [
    ('bzip2', '1.0.6'),
    ('libreadline', '7.0'),
    ('ncurses', '6.0'),
    ('SQLite', '3.19.3'),
    ('zlib', '1.2.11'),
]

osdependencies = [
    # rely upon distribution for timely security updates
    ('openssl-devel', 'libssl-dev', 'libopenssl-devel'),
]

# We hide this by default since users should not use it in production,
# high-performance Python should be delivered at compiler level with
# a default extension set
# hidden = True

# bare installation: only known module deps for GCCcore tools included
exts_list = []

# Until such time that EasyBuild accepts 'rpath' as a toolchainopt...
# add RPATH so this can be used as a builddependency for "bare" PythonPackages
preconfigopts = """
    sed -e\
      's:$(LINKCC) $(LDFLAGS) $(LINKFORSHARED):$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -Wl,-rpath=%(installdir)s/lib:'\
      -i.eb Makefile.pre.in
"""

moduleclass = 'lang'
