depot/third_party/nixpkgs/pkgs/development/python-modules/greenlet/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

68 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
# build-system
setuptools,
# tests
objgraph,
psutil,
python,
unittestCheckHook,
}:
let
greenlet = buildPythonPackage rec {
pname = "greenlet";
version = "3.0.3";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-QzdEQjUyWVVM4zWZ2otpLVqpb4l21WfUut8mM3H75JE=";
};
patches = [
# https://github.com/python-greenlet/greenlet/pull/396
./python-3.13-compat.patch
];
nativeBuildInputs = [ setuptools ];
# tests in passthru, infinite recursion via objgraph/graphviz
doCheck = false;
nativeCheckInputs = [
objgraph
psutil
unittestCheckHook
];
preCheck = ''
pushd ${placeholder "out"}/${python.sitePackages}
'';
unittestFlagsArray = [ "greenlet.tests" ];
postCheck = ''
popd
'';
passthru.tests.pytest = greenlet.overridePythonAttrs (_: {
doCheck = true;
});
meta = with lib; {
changelog = "https://github.com/python-greenlet/greenlet/blob/${version}/CHANGES.rst";
homepage = "https://github.com/python-greenlet/greenlet";
description = "Module for lightweight in-process concurrent programming";
license = with licenses; [
psfl # src/greenlet/slp_platformselect.h & files in src/greenlet/platform/ directory
mit
];
};
};
in
greenlet