Skip to content

make EasyConfig.dump aware of toolchain hierarchy, to avoid hardcoded subtoolchains in dependencies easyconfig parameters#3261

Merged
boegel merged 12 commits intoeasybuilders:developfrom
ocaisa:toolchain_hierarchy_aware_dump
Apr 11, 2020
Merged

make EasyConfig.dump aware of toolchain hierarchy, to avoid hardcoded subtoolchains in dependencies easyconfig parameters#3261
boegel merged 12 commits intoeasybuilders:developfrom
ocaisa:toolchain_hierarchy_aware_dump

Conversation

@ocaisa
Copy link
Copy Markdown
Member

@ocaisa ocaisa commented Mar 27, 2020

This PR was created to provide prettier easyconfig dumps for #2599, since in that PR the toolchains used for dependencies are fully resolved. If those resolved toolchains exist in the toolchain hierarchy then there is no need to explicitly dump them, and the results look more like standard easyconfigs.

So, for example, we would go from

easyblock = 'ConfigureMake'

name = 'fastq-tools'
version = '6.30.2'

homepage = 'https://homes.cs.washington.edu/~dcjones/%(name)s/'
description = """This package provides a number of small and efficient programs to perform
 common tasks with high throughput sequencing data in the FASTQ format. All of the programs
 work with typical FASTQ files as well as gzipped FASTQ files."""

toolchain = {'name': 'foss', 'version': '2019b'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/dcjones/%(name)s/archive/']
sources = ['v%(version)s.tar.gz']

builddependencies = [
    ('Autotools', '20180311', '', ('GCCcore', '8.3.0')),
]
dependencies = [
    ('PCRE', '8.43', '', ('GCCcore', '8.3.0')),
    ('zlib', '1.2.11', '', ('GCCcore', '8.3.0')),
]

# unsetting LIBS is needed because configure script can't handle it properly if it is already defined
preconfigopts = "./autogen.sh && unset LIBS && "


sanity_check_paths = {
    'files': ['bin/fastq-grep', 'bin/fastq-kmers', 'bin/fastq-match', 'bin/fastq-qscale', 'bin/fastq-qual', 'bin/fastq-qualadj', 'bin/fastq-sample', 'bin/fastq-sort', 'bin/fastq-uniq'],
    'dirs': ['share/man/man1'],
}

moduleclass = 'bio'

to

easyblock = 'ConfigureMake'

name = 'fastq-tools'
version = '6.30.2'

homepage = 'https://homes.cs.washington.edu/~dcjones/%(name)s/'
description = """This package provides a number of small and efficient programs to perform
 common tasks with high throughput sequencing data in the FASTQ format. All of the programs
 work with typical FASTQ files as well as gzipped FASTQ files."""

toolchain = {'name': 'foss', 'version': '2019b'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/dcjones/%(name)s/archive/']
sources = ['v%(version)s.tar.gz']

builddependencies = [
    ('Autotools', '20180311'),
]
dependencies = [
    ('PCRE', '8.43'),
    ('zlib', '1.2.11'),
]

# unsetting LIBS is needed because configure script can't handle it properly if it is already defined
preconfigopts = "./autogen.sh && unset LIBS && "


sanity_check_paths = {
    'files': ['bin/fastq-grep', 'bin/fastq-kmers', 'bin/fastq-match', 'bin/fastq-qscale', 'bin/fastq-qual', 'bin/fastq-qualadj', 'bin/fastq-sample', 'bin/fastq-sort', 'bin/fastq-uniq'],
    'dirs': ['share/man/man1'],
}

moduleclass = 'bio'

This is a somewhat convoluted alternative to #3260 to avoid circular dependencies (to get a hierarchy we need to be able to read easyconfigs, but the place where we define this PR tells us how to do that).

@easybuilders easybuilders deleted a comment from boegelbot Mar 30, 2020
@boegel boegel added this to the release after 4.2.0 (4.2.1?) milestone Apr 4, 2020
@boegel boegel changed the title Toolchain hierarchy aware dump make EasyConfig.dump aware of toolchain hierarchy, to avoid hardcoded subtoolchains in dependencies easyconfig parameters Apr 11, 2020
boegel
boegel previously approved these changes Apr 11, 2020
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel force-pushed the toolchain_hierarchy_aware_dump branch from 705e348 to c21ef59 Compare April 11, 2020 13:10
@boegel boegel merged commit 218685e into easybuilders:develop Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants