Conversation
|
This easyblock was originally designed for the EESSI-dev bot: multixscale/dev.eessi.io-espresso#6 Here is a report for --- a/easybuild/easyconfigs/e/ESPResSo/ESPResSo-4.2.2-foss-2023b.eb
+++ b/easybuild/easyconfigs/e/ESPResSo/ESPResSo-4.2.2-foss-2023b.eb
@@ -1,3 +1,3 @@
-easyblock = 'CMakeMake'
+easyblock = 'EB_ESPResSo'
name = 'ESPResSo'
@@ -31,5 +31,5 @@ configopts = ' -DCMAKE_SKIP_RPATH=OFF -DWITH_TESTS=ON -DWITH_CUDA=OFF'
configopts += ' -DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python '
-runtest = 'check_unit_tests && make check_python'
+runtest = 'check_unit_tests && ninja check_python'
_binaries = ['ipypresso', 'pypresso']Test report by @jngrad |
|
The EESSI-dev bot successfully ingested the easyconfigs with this easyblock via |
ocaisa
left a comment
There was a problem hiding this comment.
Some suggestions to bring things more in line with other easyblocks
easybuild/easyblocks/e/espresso.py
Outdated
| if not tarball.endswith('.tar.gz'): | ||
| raise ValueError(tarball + ' is not a tar.gz file') | ||
| prefix = tarball.rsplit('.', 2)[0] | ||
| matches = [x for x in os.listdir(src['finalpath']) if x.startswith(prefix)] |
There was a problem hiding this comment.
Isn't this assuming some very strict scenarios:
- All sources are
.tar.gz. I guess this is true in the easyconfig PRs related to this but I wonder if you really need to be so strict. Is there any scenario where you don't want to process a source? - All sources unpack to
<prefix>.... Again this is likely true but you could be a little forgiving
| if not tarball.endswith('.tar.gz'): | |
| raise ValueError(tarball + ' is not a tar.gz file') | |
| prefix = tarball.rsplit('.', 2)[0] | |
| matches = [x for x in os.listdir(src['finalpath']) if x.startswith(prefix)] | |
| if not tarball.endswith('.tar.gz'): | |
| raise ValueError(tarball + ' is not a tar.gz file') | |
| prefix = tarball.rsplit('.', 2)[0] | |
| matches = [x for x in os.listdir(src['finalpath']) if x.lower().startswith(prefix.lower())] |
There was a problem hiding this comment.
I've now expanded the code to check all commonly-used compression algorithms. This code finds the URI of the extracted tarball to overwrite the URL of the remote package (CMake will ignore the download and patch steps when an URI is provided). I would argue a mechanism like this one should be part of the CMakeMake/CMakeNinja easyblock, since we cannot download remote resources during the configure step.
The only use case for not processing a source is when it's a URI-based source. I'm not entirely sure how that would work, since paths to local files are platform-dependent. Pointing to an EESSI toolchain subdirectory wouldn't work, since that would prevent deploying ESPResSo to more than 1 toolchain. Pointing to a directory path passed as a CMake option could work, but I don't see any use case in ESPResSo.
ocaisa
left a comment
There was a problem hiding this comment.
I'm reasonably sure that we always use EasyBuildError
Co-authored-by: Alan O'Cais <alan.ocais@cecam.org>
|
Quite a bit of what's going on in the easyconfigs for ESPResSo v5.0.0 can/should be moved into this easyblock, see: |
Provide an easyblock to manage CMake flags for each minor release of ESPResSo and automatically download dependencies included via the FetchContent mechanism.