diff options
author | Matthias Wolf <m+git@sushinara.net> | 2019-10-10 11:34:50 +0200 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-10-10 11:34:50 +0200 |
commit | e69efded329ebbcf5ccf74ef137dc1a80bd4b4a6 (patch) | |
tree | dd35d2deb701d3759e2fcf071ce0092beb8e2286 | |
parent | d93cacfa5cc3bc01104185a1aea9382a2afd228d (diff) | |
download | spack-e69efded329ebbcf5ccf74ef137dc1a80bd4b4a6.tar.gz spack-e69efded329ebbcf5ccf74ef137dc1a80bd4b4a6.tar.bz2 spack-e69efded329ebbcf5ccf74ef137dc1a80bd4b4a6.tar.xz spack-e69efded329ebbcf5ccf74ef137dc1a80bd4b4a6.zip |
py-line-profiler: add 2.1.2, re-run cython if needed (#13102)
* py-line-profiler: add 2.1.2, re-run cython if needed
See rkern/line_profiler#166.
* Update var/spack/repos/builtin/packages/py-line-profiler/package.py
Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/py-line-profiler/package.py | 15 |
1 files changed, 14 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 4276a89c4d..2399602e77 100644 --- a/var/spack/repos/builtin/packages/py-line-profiler/package.py +++ b/var/spack/repos/builtin/packages/py-line-profiler/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack import * @@ -12,9 +14,20 @@ class PyLineProfiler(PythonPackage): homepage = "https://github.com/rkern/line_profiler" url = "https://pypi.io/packages/source/l/line_profiler/line_profiler-2.0.tar.gz" + version('2.1.2', sha256='efa66e9e3045aa7cb1dd4bf0106e07dec9f80bc781a993fbaf8162a36c20af5c') version('2.0', 'fc93c6bcfac3b7cb1912cb28836d7ee6') - depends_on('python@2.5:') + depends_on('python@2.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') depends_on('py-cython', type='build') depends_on('py-ipython@0.13:', type=('build', 'run')) + + # See https://github.com/rkern/line_profiler/issues/166 + @run_before('build') + @when('^python@3.7:') + def fix_cython(self): + cython = self.spec['py-cython'].command + for root, _, files in os.walk('.'): + for fn in files: + if fn.endswith('.pyx'): + cython(os.path.join(root, fn)) |