a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, cython
|
|
, isPyPy
|
|
, ipython
|
|
, python
|
|
, scikit-build
|
|
, cmake
|
|
, pythonOlder
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "line-profiler";
|
|
version = "4.0.2";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6" || isPyPy;
|
|
|
|
src = fetchPypi {
|
|
pname = "line_profiler";
|
|
inherit version;
|
|
hash = "sha256-JejJ1CSNxIkFgBhR/4p1ucdIJ6CHHRGNEQTY5D1/sPw=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cython
|
|
cmake
|
|
scikit-build
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
ipython
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
preBuild = ''
|
|
rm -f _line_profiler.c
|
|
'';
|
|
|
|
checkPhase = ''
|
|
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"line_profiler"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Line-by-line profiler";
|
|
homepage = "https://github.com/pyutils/line_profiler";
|
|
changelog = "https://github.com/pyutils/line_profiler/blob/v${version}/CHANGELOG.rst";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fridh ];
|
|
};
|
|
}
|