2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# tests
|
2023-01-20 10:41:00 +00:00
|
|
|
, objgraph
|
|
|
|
, psutil
|
2023-11-16 04:20:00 +00:00
|
|
|
, python
|
|
|
|
, unittestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
let greenlet = buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "greenlet";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.0.3";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-QzdEQjUyWVVM4zWZ2otpLVqpb4l21WfUut8mM3H75JE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
# tests in passthru, infinite recursion via objgraph/graphviz
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
objgraph
|
|
|
|
psutil
|
2023-11-16 04:20:00 +00:00
|
|
|
unittestCheckHook
|
2023-01-20 10:41:00 +00:00
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
pushd ${placeholder "out"}/${python.sitePackages}
|
|
|
|
'';
|
|
|
|
|
|
|
|
unittestFlagsArray = [
|
|
|
|
"greenlet.tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.pytest = greenlet.overridePythonAttrs (_: { doCheck = true; });
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
meta = with lib; {
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/python-greenlet/greenlet/blob/${version}/CHANGES.rst";
|
2021-07-21 07:28:18 +00:00
|
|
|
homepage = "https://github.com/python-greenlet/greenlet";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Module for lightweight in-process concurrent programming";
|
2021-07-21 07:28:18 +00:00
|
|
|
license = with licenses; [
|
2022-09-09 14:08:57 +00:00
|
|
|
psfl # src/greenlet/slp_platformselect.h & files in src/greenlet/platform/ directory
|
2021-07-21 07:28:18 +00:00
|
|
|
mit
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
in greenlet
|