2017-09-05 09:16:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-01-13 12:21:57 +00:00
|
|
|
, python
|
2023-05-19 02:55:41 +00:00
|
|
|
, pythonAtLeast
|
2022-01-13 12:21:57 +00:00
|
|
|
, pythonOlder
|
2022-08-06 16:32:04 +00:00
|
|
|
, unittestCheckHook
|
2017-09-05 09:16:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "contextlib2";
|
2021-08-26 19:38:06 +00:00
|
|
|
version = "21.6.0";
|
2022-01-13 12:21:57 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-05-19 02:55:41 +00:00
|
|
|
# Python 3.11 not currently supported
|
|
|
|
# https://github.com/jazzband/contextlib2/issues/43
|
|
|
|
disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
|
2017-09-05 09:16:41 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
src = fetchPypi {
|
2017-09-05 09:16:41 +00:00
|
|
|
inherit pname version;
|
2022-01-13 12:21:57 +00:00
|
|
|
hash = "sha256-qx4r/h0B2Wjht+jZAjvFHvNQm7ohe7cwzuOCfh7oKGk=";
|
2017-09-05 09:16:41 +00:00
|
|
|
};
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2022-01-13 12:21:57 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"contextlib2"
|
|
|
|
];
|
2017-12-05 19:34:20 +00:00
|
|
|
|
2022-01-13 12:21:57 +00:00
|
|
|
meta = with lib; {
|
2017-09-05 09:16:41 +00:00
|
|
|
description = "Backports and enhancements for the contextlib module";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://contextlib2.readthedocs.org/";
|
2022-01-13 12:21:57 +00:00
|
|
|
license = licenses.psfl;
|
|
|
|
maintainers = with maintainers; [ ];
|
2017-09-05 09:16:41 +00:00
|
|
|
};
|
2017-12-05 19:34:20 +00:00
|
|
|
}
|