From f7424e1fea236105c24a56526b60f572766404e7 Mon Sep 17 00:00:00 2001 From: Olivier Cessenat Date: Sun, 21 Aug 2022 20:32:10 +0200 Subject: qscintilla: coherence with py-sip (#32128) --- var/spack/repos/builtin/packages/qscintilla/package.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/qscintilla/package.py b/var/spack/repos/builtin/packages/qscintilla/package.py index f03884d1ac..c3443f3277 100644 --- a/var/spack/repos/builtin/packages/qscintilla/package.py +++ b/var/spack/repos/builtin/packages/qscintilla/package.py @@ -152,11 +152,12 @@ class Qscintilla(QMakePackage): @run_after("install") def extend_path_setup(self): - # See github issue #14121 and PR #15297 - module = self.spec["py-sip"].variants["module"].value - if module != "sip": - module = module.split(".")[0] - with working_dir(python_platlib): - with open(os.path.join(module, "__init__.py"), "w") as f: - f.write("from pkgutil import extend_path\n") - f.write("__path__ = extend_path(__path__, __name__)\n") + if self.spec["py-sip"].satisfies("@:4"): + # See github issue #14121 and PR #15297 + module = self.spec["py-sip"].variants["module"].value + if module != "sip": + module = module.split(".")[0] + with working_dir(python_platlib): + with open(os.path.join(module, "__init__.py"), "w") as f: + f.write("from pkgutil import extend_path\n") + f.write("__path__ = extend_path(__path__, __name__)\n") -- cgit v1.2.3-70-g09d2