EasyBuild/4.9.4 (EasyBuild-4.9.4.eb)
To access module help and find out for which stacks and partitions the module is
installed, use module spider EasyBuild/4.9.4.
EasyConfig:
easyblock = 'Bundle'
name = 'EasyBuild'
version = '4.9.4'
local_EB_lzip_version = '1.25' # https://download.savannah.gnu.org/releases/lzip/
local_EB_p7zip_version = '17.05' # 20240220 - Check on https://github.com/p7zip-project/p7zip/releases
local_EB_PRoot_version = '5.4.0' # https://github.com/proot-me/proot/releases
local_EB_syslibs_talloc_version = '2.4.3' # https://www.samba.org/ftp/talloc/
homepage = 'https://easybuilders.github.io/easybuild'
whatis = [
"Description: EasyBuild is a software build and installation framework written in Python that allows you to install software in a structured, repeatable and robust way."
]
description = f"""
EasyBuild is a software build and installation framework
written in Python that allows you to install software in a structured,
repeatable and robust way.
This EasyBuild module also provides some additional tools that can be used by
EasyBuild but are missing in the LUMI OS image. These include
+ lzip {local_EB_lzip_version}: Lzip is a lossless data compressor with a user interface
similar to the one of gzip or bzip2. Lzip uses a simplified form of LZMA
(Lempel-Ziv-Markov chain-Algorithm) designed to achieve complete
interoperability between implementations. Decompression speed is
intermediate between gzip and bzip2.
EasyBuild has also been patched to recognise .tar.lz, .tlz and .lz files.
+ p7zip {local_EB_p7zip_version} - https://github.com/p7zip-project/p7zip
It is used, e.g., in the Matlab EasyConfigs from EasyBuild but currently
not actively used on LUMI.
+ PRoot {local_EB_PRoot_version}: PRoot is a user-space implementation of chroot, mount --bind,
and binfmt_misc. This means that users don't need any privileges or setup to
do things like using an arbitrary directory as the new root filesystem,
making files accessible somewhere else in the filesystem hierarchy, or
executing programs built for another CPU architecture transparently through
QEMU user-mode.
It is included in the EasyBuild module as it is a useful tool to enable
building containers in `postinstallcmds` in the container modules on LUMI.
These tools are all build against the system libraries
"""
usage = """
See the documentation on readthedocs. Only the documentation of the latest
version is readily available.
The EasyBuild module on LUMI should be used through the EasyBuild-user or
EasyBuild-production modules. These modules ensure that EasyBuild is properly
configured to install software on LUMI.
* Installing software that is common to all partitions: First load the
appropriate LUMI software stack module and the hidden partition/common module
and then load either EasyBuild-user or EasyBuild-production (the latter for
system managers only) module.
* Installing software for a specific partition works in the same way, but then
by loading the appropriate partition module. It is best to compile software on
a node of that partition as cross-compiling may not always work as some packages
have the nasty habit to add compiler options that conflict with the requirements
of cross-compiling.
"""
docurls = [
"Web-based documentation on https://easybuild.readthedocs.io/"
]
toolchain = SYSTEM
# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?)
# EasyBuild is a (set of) Python packages, so it depends on Python
# usually, we want to use the system Python, so no actual Python dependency is listed
allow_system_deps = [('Python', SYS_PYTHON_VERSION)]
components = [
('EasyBuild', '4.9.4', {
'easyblock': 'EB_EasyBuildMetaLUMI',
'sources': [
{
'filename': 'easybuild_framework-%(version)s.tar.gz',
'source_urls': ['https://files.pythonhosted.org/packages/bd/25/512d9e895a86f4df198274e8a5f6868406d97cc75da9acc5797f78139b52/'],
'extract_cmd': "tar xfvz %s && mv easybuild_framework-%(version)s easybuild-framework-%(version)s",
},
{
'filename': 'easybuild_easyblocks-%(version)s.tar.gz',
'source_urls': ['https://files.pythonhosted.org/packages/d7/b0/b9289c78fafc21c5c01b225aeee89c69914166742e5f80955d49ed8f9722/'],
'extract_cmd': "tar xfvz %s && mv easybuild_easyblocks-%(version)s easybuild-easyblocks-%(version)s",
},
{
'filename': 'easybuild_easyconfigs-%(version)s.tar.gz',
'source_urls': ['https://files.pythonhosted.org/packages/ed/2c/7b2b22235ffe9310a93cbfef06fb3723466aa8ccc4aca4888b59433e55a6/'],
'extract_cmd': "tar xfvz %s && mv easybuild_easyconfigs-%(version)s easybuild-easyconfigs-%(version)s",
},
],
'patches': [
'EasyBuild-4.9.4_extra_file_formats.patch',
'EasyBuild-4.9.4_keyring_DBus.patch',
'EasyBuild-4.9.4_fix-riscv-toolchain-opts-typo.patch',
'EasyBuild-4.9.4-EasyBlock-ParMETIS.patch',
'EasyBuild-4.9.4-EasyBlock-mesonninja.patch',
],
'checksums': [
{'easybuild_framework-4.9.4.tar.gz': '5b380a2e3a359f64f06789c390200b922a840f6b10b441e5163696a34bd9bc27'},
{'easybuild_easyblocks-4.9.4.tar.gz': '1272f1e294090caafde8cbda72ae344ef400fdd161163781f67b3cffe761dd62'},
{'easybuild_easyconfigs-4.9.4.tar.gz': 'beee4e098f5fee18f2029d6a0b893549aba26e075b147cc0008cb16fd4c8d982'},
{'EasyBuild-4.9.4_extra_file_formats.patch': 'f21feed2ba99f0220d7cbb31a84f6632ccbfdce8f365ada99f5432a7ab016088'},
{'EasyBuild-4.9.4_keyring_DBus.patch': '70535e02b023162d422bf76c878a05912ee803c6dd54cb48be7dd54868a7d117'},
{'EasyBuild-4.9.4_fix-riscv-toolchain-opts-typo.patch': 'a570e9381d56cda4c281bd102db95e58125ab02dcd21814335df0cf9860b3245'},
{'EasyBuild-4.9.4-EasyBlock-ParMETIS.patch': 'fb556ac83f58bdfa5dc6c14f70cd95a515d950122ad499886cdefb75783af96e'},
{'EasyBuild-4.9.4-EasyBlock-mesonninja.patch': 'd79bc74bb4a2bc5de70aa5394d4cee4ee2033f741f0af6855f977e73e422711b'},
],
}),
('lzip', local_EB_lzip_version, { # Useful to work with .tar.lz files
'easyblock': 'ConfigureMake',
# https://download.savannah.gnu.org/releases/lzip/lzip-1.25.tar.gz
'sources': [SOURCELOWER_TAR_GZ], # .tar.lz not yet supported on our systems and not available as a constant in EasyBuild.
'source_urls': ['https://download.savannah.gnu.org/releases/lzip'],
'checksums': ['09418a6d8fb83f5113f5bd856e09703df5d37bae0308c668d0f346e3d3f0a56f'],
'start_dir': '%(namelower)s-%(version)s',
'configopts': 'CXXFLAGS="-march=znver1 -O2 -Wall -W"',
# We also abuse installopts to clean up the mess with lib and lib64 from the EasyBuild EasyBlock
# as otherwise, Python packages spread over both.
'installopts': ' && cd %(installdir)s ' +
' && /bin/rm -rf lib64 ' +
' && ln -s lib lib64 ' +
' && cd - ' +
' && mkdir -p %(installdir)s/share/licenses/lzip' +
' && cp AUTHORS COPYING NEWS README %(installdir)s/share/licenses/lzip'
}),
('p7zip', local_EB_p7zip_version, { # Once added when it seemed that we would need EasyBuild to install Matlab.
'easyblock': 'MakeCp',
'sources': [ { 'download_filename' : 'v%(version)s.tar.gz',
'filename' : SOURCE_TAR_GZ,
'source_urls' : ['https://github.com/p7zip-project/p7zip/archive/refs/tags'],
} ],
'checksums': [{f'p7zip-{local_EB_p7zip_version}.tar.gz': 'd2788f892571058c08d27095c22154579dfefb807ebe357d145ab2ddddefb1a6'}],
'start_dir': '%(namelower)s-%(version)s',
'prebuildopts': 'cp makefile.linux_amd64 makefile.linux &&',
'buildopts': 'all3 CC="gcc" CXX="g++" OPTFLAGS="-O2 -march=znver1"',
'files_to_copy': [
(['bin/7za', 'bin/7zr', 'bin/7zCon.sfx'], 'bin'), # stand-alone binaries
(['bin/7z', 'bin/7z.%s' % SHLIB_EXT, 'bin/Codecs'], 'libexec'), # 7z requires 7z.so plugin in same directory
(['ChangeLog', 'DOC/copying.txt', 'DOC/License.txt'], 'share/licenses/%(name)s'), # License information
],
}),
# talloc is needed only to be able to build PRoot afterwards and is removed again in
# postinstallcmds.
('talloc', local_EB_syslibs_talloc_version, {
'easyblock': 'ConfigureMake',
# https://www.sqlite.org/2022/sqlite-autoconf-3370200.tar.gz
'sources': [SOURCELOWER_TAR_GZ],
'source_urls': ['https://www.samba.org/ftp/talloc'],
'checksums': ['dc46c40b9f46bb34dd97fe41f548b0e8b247b77a918576733c528e83abd854dd'],
'start_dir': '%(namelower)s-%(version)s',
'preconfigopts': 'CC="gcc" CFLAGS="-O2 -march=znver1" ',
'configopts': '--disable-python --disable-rpath',
'installopts': ' && cd %(builddir)s/talloc-%(version)s/bin/default ' +
' && /usr/bin/ar rcs %(installdir)s/lib/libtalloc.a talloc.c.*.o ' +
' && /bin/rm %(installdir)s/lib/libtalloc.so*',
}),
('PRoot', local_EB_PRoot_version, {
'easyblock': 'ConfigureMake',
# Source code https://github.com/proot-me/proot/archive/refs/tags/v5.4.0.zip
'sources': [ {
'download_filename': 'v%(version)s.zip',
'filename': SOURCELOWER_ZIP,
'source_urls': ['https://github.com/proot-me/proot/archive/refs/tags']
} ],
'checksums': ['8812f3a6c224bdd6a316f13689377e7543e7e3cebcdef6ec98827abee60fa327'],
'start_dir': '%(namelower)s-%(version)s/src',
'skipsteps': [ 'configure' ],
'prebuildopts': 'sed -e "s/.*GIT_.*//" -i GNUmakefile && ' +
'PKG_CONFIG_PATH="%(installdir)s/lib/pkgconfig" ',
'buildopts': 'proot V=1 CC="gcc" CFLAGS="-O2 -march=znver1" VERSION="%(version)s"',
'installopts': 'V=1 PREFIX="%(installdir)s" ' +
'&& mkdir -p %(installdir)s/share/licenses/PRoot && cd .. && cp AUTHORS CHANGELOG.rst COPYING README.rst %(installdir)s/share/licenses/PRoot',
})
]
local_pyshortver = '.'.join(SYS_PYTHON_VERSION.split('.')[:2])
exts_defaultclass = 'PythonPackage'
exts_filter = (f"/usr/bin/python{local_pyshortver} -c 'import %(ext_name)s'", '')
exts_default_options = {
'download_dep_fail': True,
'sanity_pip_check': False,
'source_urls': [PYPI_SOURCE],
'use_pip': False,
}
exts_list = [
('click', '7.1.2', {}), # archspec 0.1.3 is incompatible with more recent versions of click
('archspec', '0.1.3', {}),
('colorama', '0.4.4', {}),
('commonmark', '0.9.1', {}),
('dataclasses', '0.8', {}),
('Pygments', '2.11.2', {}),
('typing_extensions', '3.10.0.2', {}), # The 4.0.x versions did not install, maybe due to the lack of pip?
('rich', '11.2.0', {}),
# Trying to install PyYAML but it installs in the wrong directory. Tests pass but
# when you try to use it afterwards, Python fails to find it.
('PyYAML', '5.4.1', {'modulename': 'yaml'}), # Needed for easystack support in containers that do not yet provide the package.
]
postinstallcmds = [
# Remove talloc as we don't need it anymore; it is statically linked into proot.
'/bin/rm -f %(installdir)s/lib/libtalloc.a && /bin/rm -rf %(installdir)s/include',
# Copy the EasyBuild license files.
f'cd %(builddir)s/easybuild-framework-{version} && mkdir %(installdir)s/share/licenses/EasyBuild && ' +
'cp CONTRIBUTING.md LICENSE README.rst RELEASE_NOTES %(installdir)s/share/licenses/EasyBuild',
# Robustify a number of commands by hard-coding the Python to use and integrating
# setting the search path for Python packages.
f'sed -i -e \'s|bin/python3|bin/python{local_pyshortver} -E|\' -e \'s|import sys|import sys\\nsys.path.append("%(installdir)s/lib/python{local_pyshortver}/site-packages")|\' %(installdir)s/bin/archspec',
f'sed -i -e \'s|bin/python3|bin/python{local_pyshortver} -E|\' -e \'s|import sys|import sys\\nsys.path.append("%(installdir)s/lib/python{local_pyshortver}/site-packages")|\' %(installdir)s/bin/cmark',
f'sed -i -e \'s|bin/python3|bin/python{local_pyshortver} -E|\' -e \'s|import sys|import sys\\nsys.path.append("%(installdir)s/lib/python{local_pyshortver}/site-packages")|\' %(installdir)s/bin/pygmentize',
f'sed -i -e \'s|^PYTHON=.*|export PYTHONPATH="%(installdir)s/lib/python{local_pyshortver}/site-packages:%(installdir)s/lib64/python{local_pyshortver}/site-packages"\\nPYTHON=|\' -e \'s|for python_cmd in|for python_cmd in "/usr/bin/python{local_pyshortver}"|\' %(installdir)s/bin/eb',
# p7zip: Create the 7z script in the bin directory.
'echo \'#!/bin/sh\n%(installdir)s/libexec/7z $@\' > %(installdir)s/bin/7z',
'chmod +x %(installdir)s/bin/7z', # set execution bits according to current umask
]
sanity_check_paths = {
'files': #EasyBuild
['bin/eb'] +
# lzip
['bin/lzip'] +
# p7zip
['bin/7z', 'bin/7za', 'bin/7zr', 'libexec/7z', 'libexec/7z.%s' % SHLIB_EXT] +
# PRoot
['bin/proot'],
'dirs': # EasyBuild
[f'lib/python{local_pyshortver}/site-packages'] +
# p7zip
['libexec/Codecs'],
}
sanity_check_commands = [
'unset PYTHONPATH && archspec --version',
'unset PYTHONPATH && cmark -h',
'unset PYTHONPATH && pygmentize -V',
'unset PYTHONPATH && eb --version',
'lzip --version',
'7za --help',
'7zr --help',
"7z --help",
"7z x || test $? -gt 0",
"""! 7z i | grep -q "Can't load" """,
'proot --version',
]
# Set Python 3 for EasyBuild: Not needed as we hard-coded it.
#modextravars = {
# 'EB_PYTHON': f'/usr/bin/python{local_pyshortver}',
#}
modextrapaths = {
'PYTHONPATH': [f'lib/python{local_pyshortver}/site-packages']
}
moduleclass = 'tools'