From b7508dffa434069b92657a3f309501903481f4fe Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 12 Apr 2024 17:07:40 +0200 Subject: [PATCH] Allow 'nosource: True' in PythonPackage extensions' --- easybuild/easyblocks/generic/pythonpackage.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/easybuild/easyblocks/generic/pythonpackage.py b/easybuild/easyblocks/generic/pythonpackage.py index da6ca8c2a8..de4bd0b7bc 100644 --- a/easybuild/easyblocks/generic/pythonpackage.py +++ b/easybuild/easyblocks/generic/pythonpackage.py @@ -623,7 +623,7 @@ def compose_install_command(self, prefix, extrapath=None, installopts=None): loc = self.cfg.get('install_src') if not loc: - if self._should_unpack_source(): + if self._should_unpack_source() or not self.src: # specify current directory loc = '.' elif isinstance(self.src, string_type): @@ -904,9 +904,6 @@ def install_step(self): def run(self, *args, **kwargs): """Perform the actual Python package build/installation procedure""" - if not self.src: - raise EasyBuildError("No source found for Python package %s, required for installation. (src: %s)", - self.name, self.src) # we unpack unless explicitly told otherwise kwargs.setdefault('unpack_src', self._should_unpack_source()) super(PythonPackage, self).run(*args, **kwargs)