nixpkgs/pkgs/development/python-modules/line_profiler/default.nix

54 lines
908 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, cython
, isPyPy
, ipython
, python
, scikit-build
2020-06-24 17:55:48 +01:00
, cmake
}:
buildPythonPackage rec {
pname = "line_profiler";
version = "3.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "e73ff429236d59d48ce7028484becfa01449b3d52abdcf7337e0ff2acdc5093c";
};
2020-06-24 17:55:48 +01:00
nativeBuildInputs = [
cython
cmake
scikit-build
];
2020-06-24 17:55:48 +01:00
dontUseCmakeConfigure = true;
propagatedBuildInputs = [
ipython
];
disabled = isPyPy;
preBuild = ''
rm -f _line_profiler.c
'';
2020-06-24 17:55:48 +01:00
checkInputs = [
ipython
];
checkPhase = ''
2020-06-24 17:55:48 +01:00
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
'';
meta = {
description = "Line-by-line profiler";
homepage = "https://github.com/rkern/line_profiler";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fridh ];
};
}