2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-05-03 20:48:10 +00:00
|
|
|
, setuptools-scm
|
2020-06-18 07:06:33 +00:00
|
|
|
, importlib-metadata
|
2021-04-26 19:14:03 +00:00
|
|
|
, typing ? null
|
|
|
|
, singledispatch ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, pythonOlder
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-05-03 20:48:10 +00:00
|
|
|
pname = "importlib-resources";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "5.2.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-05-03 20:48:10 +00:00
|
|
|
pname = "importlib_resources";
|
|
|
|
inherit version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-pliCpND+X79wInNFa6LOdP5EiSwl5C4FespSa3AqbUs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2020-06-18 07:06:33 +00:00
|
|
|
importlib-metadata
|
|
|
|
] ++ lib.optional (pythonOlder "3.4") singledispatch
|
2020-04-24 23:36:52 +00:00
|
|
|
++ lib.optional (pythonOlder "3.5") typing
|
|
|
|
;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Read resources from Python packages";
|
|
|
|
homepage = "https://importlib-resources.readthedocs.io/";
|
|
|
|
license = licenses.asl20;
|
2021-05-03 20:48:10 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|