2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchpatch
|
|
|
|
, fetchPypi
|
|
|
|
, freezegun
|
|
|
|
, numpy
|
|
|
|
, py
|
|
|
|
, pytestCheckHook
|
2023-02-02 18:25:31 +00:00
|
|
|
, pythonAtLeast
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pypytools";
|
|
|
|
version = "0.6.2";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-oUDAU+TRwLroNfQGYusAQKdRkHcazysqiDLfp77v5Sk=";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
py
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
freezegun
|
|
|
|
numpy
|
2023-01-20 10:41:00 +00:00
|
|
|
py
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Support for later Python releases, https://github.com/antocuni/pypytools/pull/2
|
|
|
|
(fetchpatch {
|
|
|
|
name = "support-later-python.patch";
|
|
|
|
url = "https://github.com/antocuni/pypytools/commit/c6aed496ec35a6ef7ce9e95084849eebc16bafef.patch";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-YoYRZmgueQmxRtGaeP4zEVxuA0U7TB0PmoYHHVI7ICQ=";
|
2022-02-10 20:34:41 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pypytools"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
# https://github.com/antocuni/pypytools/issues/4
|
|
|
|
"test_clonefunc"
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Collection of tools to use PyPy-specific features";
|
|
|
|
homepage = "https://github.com/antocuni/pypytools";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|