summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/py-line-profiler/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-line-profiler/package.py b/var/spack/repos/builtin/packages/py-line-profiler/package.py
index c06a8968ea..a40b1a3e15 100644
--- a/var/spack/repos/builtin/packages/py-line-profiler/package.py
+++ b/var/spack/repos/builtin/packages/py-line-profiler/package.py
@@ -24,8 +24,11 @@ class PyLineProfiler(PythonPackage):
# See https://github.com/rkern/line_profiler/issues/166
@run_before('build')
- @when('^python@3.7:')
def fix_cython(self):
+ # TODO: Replace the check with a `@when('^python@3.7:')` decorator once
+ # https://github.com/spack/spack/issues/12736 is resolved
+ if not self.spec.satisfies("^python@3.7:"):
+ return
cython = self.spec['py-cython'].command
for root, _, files in os.walk('.'):
for fn in files: