1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools-scm,
7 backports-tarfile,
8}:
9
10buildPythonPackage rec {
11 pname = "jaraco-context";
12 version = "6.0.1";
13 pyproject = true;
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "jaraco";
19 repo = "jaraco.context";
20 tag = "v${version}";
21 hash = "sha256-WXZX2s9Qehp0F3bSv2c5lGxhhn6HKFkABbtYKizG1/8=";
22 };
23
24 pythonNamespaces = [ "jaraco" ];
25
26 build-system = [ setuptools-scm ];
27
28 dependencies = lib.optionals (pythonOlder "3.12") [ backports-tarfile ];
29
30 # Module has no tests
31 doCheck = false;
32
33 pythonImportsCheck = [ "jaraco.context" ];
34
35 meta = with lib; {
36 description = "Python module for context management";
37 homepage = "https://github.com/jaraco/jaraco.context";
38 changelog = "https://github.com/jaraco/jaraco.context/blob/v${version}/CHANGES.rst";
39 license = licenses.mit;
40 maintainers = with maintainers; [ fab ];
41 };
42}