mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
63 lines
1.1 KiB
Nix
63 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 ];
|
|
};
|
|
}
|