diff options
author | Olivier Cessenat <cessenat@gmail.com> | 2022-08-21 20:32:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-21 11:32:10 -0700 |
commit | f7424e1fea236105c24a56526b60f572766404e7 (patch) | |
tree | eabc42245f933c0c304913df37cd7c388969a144 | |
parent | ab31256ee77129db7355bd4e1793dce6772734f8 (diff) | |
download | spack-f7424e1fea236105c24a56526b60f572766404e7.tar.gz spack-f7424e1fea236105c24a56526b60f572766404e7.tar.bz2 spack-f7424e1fea236105c24a56526b60f572766404e7.tar.xz spack-f7424e1fea236105c24a56526b60f572766404e7.zip |
qscintilla: coherence with py-sip (#32128)
-rw-r--r-- | var/spack/repos/builtin/packages/qscintilla/package.py | 17 |
1 files changed, 9 insertions, 8 deletions
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") |