nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 63 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 cython, 6 isPyPy, 7 ipython, 8 scikit-build, 9 cmake, 10 pytestCheckHook, 11 ubelt, 12}: 13 14buildPythonPackage rec { 15 pname = "line-profiler"; 16 version = "5.0.0"; 17 format = "setuptools"; 18 19 disabled = isPyPy; 20 21 src = fetchPypi { 22 pname = "line_profiler"; 23 inherit version; 24 hash = "sha256-qA8K+wW6DSddnd3F/5fqtjdHEWf/Pmbcx9E1dVBZOYw="; 25 }; 26 27 nativeBuildInputs = [ 28 cython 29 cmake 30 scikit-build 31 ]; 32 33 optional-dependencies = { 34 ipython = [ ipython ]; 35 }; 36 37 nativeCheckInputs = [ 38 pytestCheckHook 39 ubelt 40 ] 41 ++ optional-dependencies.ipython; 42 43 dontUseCmakeConfigure = true; 44 45 preBuild = '' 46 rm -f _line_profiler.c 47 ''; 48 49 preCheck = '' 50 rm -r line_profiler 51 export PATH=$out/bin:$PATH 52 ''; 53 54 pythonImportsCheck = [ "line_profiler" ]; 55 56 meta = { 57 description = "Line-by-line profiler"; 58 mainProgram = "kernprof"; 59 homepage = "https://github.com/pyutils/line_profiler"; 60 changelog = "https://github.com/pyutils/line_profiler/blob/v${version}/CHANGELOG.rst"; 61 license = lib.licenses.bsd3; 62 }; 63}