1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6
7 # build-system
8 setuptools,
9 setuptools-scm,
10
11 # dependencies
12 importlib-metadata,
13
14 # Reverse dependency
15 sage,
16
17 # tests
18 jaraco-collections,
19 jaraco-test,
20 pytestCheckHook,
21}:
22
23buildPythonPackage rec {
24 pname = "importlib-resources";
25 version = "6.5.2";
26 pyproject = true;
27
28 disabled = pythonOlder "3.6";
29
30 src = fetchPypi {
31 pname = "importlib_resources";
32 inherit version;
33 hash = "sha256-GF+Hre9bzCiESdmPtPugfOp4vANkVd1ExfxKL+eP7Sw=";
34 };
35
36 build-system = [
37 setuptools
38 setuptools-scm
39 ];
40
41 dependencies = [ importlib-metadata ];
42
43 nativeCheckInputs = [
44 pytestCheckHook
45 jaraco-collections
46 jaraco-test
47 ];
48
49 pythonImportsCheck = [ "importlib_resources" ];
50
51 passthru.tests = {
52 inherit sage;
53 };
54
55 meta = with lib; {
56 description = "Read resources from Python packages";
57 homepage = "https://importlib-resources.readthedocs.io/";
58 license = licenses.asl20;
59 maintainers = [ ];
60 };
61}