1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pythonOlder,
7 unittestCheckHook,
8}:
9
10buildPythonPackage {
11 pname = "contextlib2";
12 version = "21.6.0-unstable-2024-05-23";
13 pyproject = true;
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "jazzband";
19 repo = "contextlib2";
20 rev = "f64cf04df8a1f6a32ce2095192b4638d229ff25e";
21 hash = "sha256-HX9N8G8jl6cpEwdJ80pDcoo4osTO/f8fz5sNcY/R1Nk=";
22 };
23
24 build-system = [ setuptools ];
25
26 nativeCheckInputs = [ unittestCheckHook ];
27
28 pythonImportsCheck = [ "contextlib2" ];
29
30 meta = {
31 description = "Backports and enhancements for the contextlib module";
32 homepage = "https://contextlib2.readthedocs.org/";
33 license = lib.licenses.psfl;
34 maintainers = with lib.maintainers; [ sigmanificient ];
35 };
36}