mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 00:33:10 +00:00
Merge pull request #202150 from tjni/pyperf
This commit is contained in:
commit
d001948f41
@ -1,38 +1,41 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, six
|
||||
, statistics
|
||||
, fetchpatch
|
||||
, pythonOlder
|
||||
, nose
|
||||
, psutil
|
||||
, contextlib2
|
||||
, mock
|
||||
, unittest2
|
||||
, isPy27
|
||||
, python
|
||||
, unittestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyperf";
|
||||
version = "2.4.1";
|
||||
version = "2.5.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-OM9ekMVvkGqDIM6CpQv6kskCuTr/1y5NyBWAEV81WFM=";
|
||||
hash = "sha256-n9m+W1ciTmi1pbiPcSbxW2yGZ1c/YqCjn68U1v3ROQk=";
|
||||
};
|
||||
|
||||
checkInputs = [ nose psutil ] ++
|
||||
lib.optionals isPy27 [ contextlib2 mock unittest2 ];
|
||||
propagatedBuildInputs = [ six ] ++
|
||||
lib.optionals (pythonOlder "3.4") [ statistics ];
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "fix-pythonpath-in-tests.patch";
|
||||
url = "https://github.com/psf/pyperf/commit/d373c5e56c0257d2d7abd705b676bea25cf66566.patch";
|
||||
hash = "sha256-2q1fTf+uU3qj3BG8P5otX4f7mSTnQxm4sfmmgIUuszA=";
|
||||
})
|
||||
];
|
||||
|
||||
# tests not included in pypi repository
|
||||
doCheck = false;
|
||||
propagatedBuildInputs = [
|
||||
psutil
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m nose
|
||||
'';
|
||||
checkInputs = [
|
||||
unittestCheckHook
|
||||
];
|
||||
|
||||
unittestFlagsArray = [ "-s" "pyperf/tests/" "-v" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python module to generate and modify perf";
|
||||
|
Loading…
Reference in New Issue
Block a user