2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
python,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
unittestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "contextlib2";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "21.6.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# Python 3.11 not currently supported
|
|
|
|
# https://github.com/jazzband/contextlib2/issues/43
|
|
|
|
disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-qx4r/h0B2Wjht+jZAjvFHvNQm7ohe7cwzuOCfh7oKGk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "contextlib2" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Backports and enhancements for the contextlib module";
|
|
|
|
homepage = "https://contextlib2.readthedocs.org/";
|
2022-01-13 20:06:32 +00:00
|
|
|
license = licenses.psfl;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|