Files
nixpkgs/pkgs/development/python-modules/line-profiler/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

65 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
cython,
isPyPy,
ipython,
scikit-build,
cmake,
pythonOlder,
pytestCheckHook,
ubelt,
}:
buildPythonPackage rec {
pname = "line-profiler";
version = "5.0.0";
format = "setuptools";
disabled = pythonOlder "3.8" || isPyPy;
src = fetchPypi {
pname = "line_profiler";
inherit version;
hash = "sha256-qA8K+wW6DSddnd3F/5fqtjdHEWf/Pmbcx9E1dVBZOYw=";
};
nativeBuildInputs = [
cython
cmake
scikit-build
];
optional-dependencies = {
ipython = [ ipython ];
};
nativeCheckInputs = [
pytestCheckHook
ubelt
]
++ optional-dependencies.ipython;
dontUseCmakeConfigure = true;
preBuild = ''
rm -f _line_profiler.c
'';
preCheck = ''
rm -r line_profiler
export PATH=$out/bin:$PATH
'';
pythonImportsCheck = [ "line_profiler" ];
meta = {
description = "Line-by-line profiler";
mainProgram = "kernprof";
homepage = "https://github.com/pyutils/line_profiler";
changelog = "https://github.com/pyutils/line_profiler/blob/v${version}/CHANGELOG.rst";
license = lib.licenses.bsd3;
};
}