forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
py-line-profiler: add 2.1.2, re-run cython if needed (spack#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 <[email protected]>
- Loading branch information
Showing
1 changed file
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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('[email protected]:') | ||
depends_on('[email protected]:', type=('build', 'run')) | ||
depends_on('py-setuptools', type='build') | ||
depends_on('py-cython', type='build') | ||
depends_on('[email protected]:', type=('build', 'run')) | ||
|
||
# See https://github.com/rkern/line_profiler/issues/166 | ||
@run_before('build') | ||
@when('^[email protected]:') | ||
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)) |