easybuild-easyblocks icon indicating copy to clipboard operation
easybuild-easyblocks copied to clipboard

PythonPackage easyblock: modulename should be a first-class parameter, not under the options parameter

Open bryank-cs opened this issue 4 years ago • 2 comments

Currently to set the python module name to test in the sanity check the syntax is: "options={'modulename':'newname'}". The request is to change it to simply "modulename='newname'".

bryank-cs avatar Mar 01 '21 20:03 bryank-cs

There should also be a more intuitive (and documented...) way of skipping the import check than setting modulename to False...

boegel avatar Oct 12 '23 13:10 boegel

Note that for extensions it is already fine:

exts_list = [
    ('hydra-colorlog', '1.2.0', {
        'sanity_pip_check': False,
        'modulename': 'hydra',
        'checksums': ['d44f85008fabd2448c7e3b496c31b44d7610560f6fff74f3673afaa949870899'],
    }),
]

It doesn't get better there. So the requested change only applies to "root" PythonPackage. It looks like it is the only entry used from "self.options" so it indeed makes sense and I guess for extensions that would just work.

There should also be a more intuitive (and documented...) way of skipping the import check than setting modulename to False...

That is only done for extensions isn't it? We should do it for PythonPackage too. Also note that "skipping the import check" also means that --skip won't work. So IMO we should just better document the behavior as I think modulename: False is clear enough for the only valid use case I can imagine: There is no package which could be imported.

Flamefire avatar Jan 10 '24 11:01 Flamefire