2018-10-15 22:50:34 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-10-25 21:26:16 +01:00
|
|
|
, psutil
|
|
|
|
, python
|
2018-10-15 22:50:34 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "memory_profiler";
|
2018-10-25 21:26:16 +01:00
|
|
|
version = "0.54.0";
|
2018-10-15 22:50:34 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-10-25 21:26:16 +01:00
|
|
|
sha256 = "d64342a23f32e105f4929b408a8b89d9222c3ce8afbbb3359817555811448d1a";
|
2018-10-15 22:50:34 +01:00
|
|
|
};
|
|
|
|
|
2018-10-25 21:26:16 +01:00
|
|
|
propagatedBuildInputs = [ psutil ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
make test PYTHON=${python.interpreter}
|
|
|
|
'';
|
|
|
|
|
2018-10-15 22:50:34 +01:00
|
|
|
# Tests don't import profile
|
2018-10-25 21:26:16 +01:00
|
|
|
# doCheck = false;
|
2018-10-15 22:50:34 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A module for monitoring memory usage of a python program";
|
|
|
|
homepage = https://pypi.python.org/pypi/memory_profiler;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|