diff --git a/easybuild/easyblocks/generic/pythonpackage.py b/easybuild/easyblocks/generic/pythonpackage.py index d972850ca0..e1fe5b3e51 100644 --- a/easybuild/easyblocks/generic/pythonpackage.py +++ b/easybuild/easyblocks/generic/pythonpackage.py @@ -804,6 +804,13 @@ def build_step(self): # take into account that build/install steps may be run multiple times # We consider the build and install output together as downloads likely happen here if this is run self.install_cmd_output += res.output + elif (self.cfg['prebuildopts'] and not self.cfg['preinstallopts']) or ( + self.cfg['buildopts'] and not self.cfg['installopts']): + msg = '(pre_)build_opts specified but no build is beeing run.' + if self.using_pip_install(): + msg += ' When using pip only the install step is performed and the build options are ignored.' + msg += ' Use (pre_)install_opts in this case.' + raise EasyBuildError(msg) def test_step(self, return_output_ec=False): """