323 | | A: When you have an !EasyConfig for a language like Perl, Python, R, etc. you may have a long list of extra Perl modules, Python eggs, R packages, etc. |
324 | | If your install failed near the end of these extensions it ain't fun to start all over from scratch. |
| 323 | A: When you have an !EasyConfig of type {{{easyblock = 'Bundle'}}} with a long list of extra modules, packages, etc. for a language like Perl, Python, R, etc. and your install failed partially it ain't fun to start all over from scratch. |
326 | | * Your config specifies both the extension defaultclass - e.g. {{{exts_defaultclass = 'PerlModule'}}} |
327 | | * and the extension filter (command to test whether installation of the extension succeeded) - e.g. {{{exts_filter = ("perldoc -lm %(ext_name)s ", "")}}} |
328 | | * and when you use the {{{--skip}}} and {{{--resume}}} commandline options for the {{{eb}}} command - e.g.: |
| 325 | * Your config specifies the extension defaultclass (= the !EasyBlock) using {{{exts_defaultclass = 'someEasyBlock'}}} |
| 326 | * and the extension filter (= command to test whether installation of the extension succeeded) using {{{exts_filter = ("someCommand", "")}}} |
| 327 | * and when you've added the path where the additional modules/packages will be installed to the language specific environment variable that is used to search for extras - {{{PERL5LIB}}} for Perl, {{{PYTHONPATH}}} for Python, {{{R_LIBS}}} for R, etc. |
| 328 | * and when you use the {{{--skip}}} and {{{--resume}}} commandline options for the {{{eb}}} command - e.g. |
| 334 | * and when deployment already finished succesfully resulting in a module file, but there is an easy workaround: just touch an empty module file: |
| 335 | {{{ |
| 336 | $> touch ${HPC_ENV_PREFIX/modules/all/moduleName/moduleVersion.lua |
| 337 | }}} |
| 338 | Once the deployment finished successfully the fake empty module file will be overwritten with a proper one. |
| 339 | |
| 340 | Example of a minimal Bundle to extend Perl 5.22.0 with the module Some::Module version 1.2.3 from CPAN: |
| 341 | {{{ |
| 342 | easyblock = 'Bundle' |
| 343 | |
| 344 | name = 'PerlPlus' |
| 345 | version = '5.22.0' # Same as the vanilla Perl module on which these add-on modules depend. |
| 346 | versionsuffix = '-v17.01.1' # In format YY.MM.IncrementedReleaseNumber. |
| 347 | |
| 348 | homepage = 'http://www.perl.org/' |
| 349 | description = """Extra modules for Larry Wall's Practical Extraction and Report Language.""" |
| 350 | |
| 351 | toolchain = {'name': 'foss', 'version': '2015b'} |
| 352 | toolchainopts = {'optarch': True, 'pic': True} |
| 353 | |
| 354 | dependencies = [ |
| 355 | ('Perl', version, '-bare'), |
| 356 | ] |
| 357 | |
| 358 | modextrapaths = {'PERL5LIB': ['lib/perl5/', 'lib/perl5/site_perl','lib/perl5/site_perl/5.22.0/'] } |
| 359 | moduleclass = 'lang' |
| 360 | |
| 361 | exts_defaultclass = 'PerlModule' |
| 362 | exts_filter = ("perldoc -lm %(ext_name)s ", "") |
| 363 | exts_list = [ |
| 364 | ('Some::Module', '1.2.3', { |
| 365 | 'source_tmpl': 'Some-Module-1.2.3.tar.gz', |
| 366 | 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AU/AUTHOR'], |
| 367 | }), |
| 368 | }}} |
| 369 | |
| 370 | Example of a minimal Bundle to extend Python 2.7.11 with the egg !SomeEgg version 1.2.3 from !PyPi: |
| 371 | |
| 372 | {{{ |
| 373 | easyblock = 'Bundle' |
| 374 | |
| 375 | name = 'PythonPlus' |
| 376 | version = '%(pyver)s' # Same as the vanilla Python module on which these add-on modules depend. |
| 377 | versionsuffix = '-v17.06.1' # In format YY.MM.IncrementedReleaseNumber. |
| 378 | |
| 379 | homepage = 'https://www.python.org/' |
| 380 | description = """The PythonPlus bundle contains add-on modules for Python.""" |
| 381 | |
| 382 | toolchain = {'name': 'foss', 'version': '2015b'} |
| 383 | |
| 384 | dependencies = [ |
| 385 | ('Python', '2.7.11'), |
| 386 | ] |
| 387 | |
| 388 | exts_defaultclass = 'PythonPackage' |
| 389 | exts_filter = ('python -c "import %(ext_name)s"', "") |
| 390 | |
| 391 | exts_list = [ |
| 392 | ('SomeEgg', '1.2.3', { |
| 393 | 'source_urls': ['https://pypi.python.org/packages/....long URL'], |
| 394 | 'checksums': ['da32434ebfebae2c7506e9577ac558f5'], |
| 395 | 'source_tmpl': '%(name)s-%(version)s.zip', # Only required when file name deviates from default naming scheme @ PiPy. |
| 396 | 'modulename': 'segg', # name of module for Python import command. Only required when not the same as name of the extension. |
| 397 | }), |
| 398 | ] |
| 399 | |
| 400 | modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} |
| 401 | |
| 402 | full_sanity_check = True |
| 403 | sanity_check_paths = { |
| 404 | 'files': [], |
| 405 | 'dirs': ['lib/python%(pyshortver)s/site-packages'], |
| 406 | } |
| 407 | |
| 408 | moduleclass = 'lang' |
| 409 | }}} |