Skip to content

enhance Bowtie2 easyblock: set correct build options, copy more files, extend sanity check#1146

Merged
boegel merged 2 commits intoeasybuilders:developfrom
boegel:bowtie2_easyblock
Mar 23, 2017
Merged

enhance Bowtie2 easyblock: set correct build options, copy more files, extend sanity check#1146
boegel merged 2 commits intoeasybuilders:developfrom
boegel:bowtie2_easyblock

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Mar 21, 2017

Triggered by addition of RELEASE_FLAGS in buildopts by @klust in easybuilders/easybuild-easyconfigs#4372

This makes the Bowtie2 installations across toolchains consistent, and allows to clean up the Bowtie2 easyconfigs significantly (cfr. easybuilders/easybuild-easyconfigs#4380)

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 21, 2017

@wpoely86 please review?

if cxx:
self.cfg.update('buildopts', 'CPP="%s" CXX="%s"' % (cxx, cxx))

cxxflags = os.getenv('CXXFLAGS')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no CFLAGS? Or LDFLAGS?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

no, this is just about making sure the optimisation compiler flags specified by EasyBuild are used, rather than the hardcoded defaults

Comment thread easybuild/easyblocks/b/bowtie2.py Outdated
srcdir = os.path.join(self.cfg['start_dir'], dirname)
targetdir = os.path.join(self.installdir, dirname)
try:
shutil.copytree(srcdir, targetdir)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we have a copytree?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, but we should probably get rid of it, it was there to use it when we were still supporting Python 2.4

Instead, we should have a copy_dir function that wraps around shutil.copytree or something...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also fine by me. Just not directly shutil.copytree

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

support for copy_dir implemented in easybuilders/easybuild-framework#2177

Comment thread easybuild/easyblocks/b/bowtie2.py Outdated
from easybuild.tools.filetools import copy_file


class EB_Bowtie2(ConfigureMake):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not MakeCp?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

because then I have to fiddle with the mandatory files_to_copy easyconfig parameter, not worth the trouble here imho

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So you basically recreate the MakeCp block? It's definitely worth the trouble not recreating existing blocks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

MakeCp implements a generic procedure where files specified in files_to_copy are being copied

Here we implement a custom install_step for Bowtie2 that copies very specific files/directories, so whether we derive from ConfigureMake or MakeCp doesn't make a difference, except that if we derive from MakeCp we have to take extra action to avoid that files_to_copy has to be specified (while it doesn't make sense to specify it in this specific case).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have a whole bunch of blocks that already do this (deriving from MakeCp and filling in the files_to_copy) so I don't see why this should be any different. Any future enhancements made to MakeCp will also need to be ported to this block.

Now you have to take the action of letting the configure_step be pass while in the MakeCp case you need to specify that files_to_copy is not mandatory in the easyconfig. So I don't see much difference in that regard.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed, please rereview?

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 23, 2017

tested with easybuilders/easybuild-easyconfigs#4380, good to go, thanks for the review @wpoely86!

@boegel boegel merged commit d7d3f6b into easybuilders:develop Mar 23, 2017
@boegel boegel deleted the bowtie2_easyblock branch March 23, 2017 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants