Fix py-line-profiler incompatible decorators (#13911)
`@run_after` and `@when` are incompatible, issue #12736.
This commit is contained in:
parent
51ee8aa639
commit
d207dceb3a
1 changed files with 4 additions and 1 deletions
|
@ -24,8 +24,11 @@ class PyLineProfiler(PythonPackage):
|
||||||
|
|
||||||
# See https://github.com/rkern/line_profiler/issues/166
|
# See https://github.com/rkern/line_profiler/issues/166
|
||||||
@run_before('build')
|
@run_before('build')
|
||||||
@when('^python@3.7:')
|
|
||||||
def fix_cython(self):
|
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
|
cython = self.spec['py-cython'].command
|
||||||
for root, _, files in os.walk('.'):
|
for root, _, files in os.walk('.'):
|
||||||
for fn in files:
|
for fn in files:
|
||||||
|
|
Loading…
Reference in a new issue