2018-11-21 03:19:56 -08:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-04-28 08:38:29 -07:00
|
|
|
, setuptools-scm
|
2020-06-03 20:40:59 -07:00
|
|
|
, importlib-metadata
|
2021-03-25 00:23:40 -07:00
|
|
|
, typing ? null
|
|
|
|
, singledispatch ? null
|
2018-11-21 03:19:56 -08:00
|
|
|
, pythonOlder
|
2018-12-27 00:22:53 -08:00
|
|
|
, python
|
2018-11-21 03:19:56 -08:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-04-28 08:38:29 -07:00
|
|
|
pname = "importlib-resources";
|
2021-03-12 11:12:22 -08:00
|
|
|
version = "5.1.2";
|
2018-11-21 03:19:56 -08:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-04-28 08:38:29 -07:00
|
|
|
pname = "importlib_resources";
|
|
|
|
inherit version;
|
2021-03-12 11:12:22 -08:00
|
|
|
sha256 = "642586fc4740bd1cad7690f836b3321309402b20b332529f25617ff18e8e1370";
|
2018-11-21 03:19:56 -08:00
|
|
|
};
|
|
|
|
|
2021-04-28 08:38:29 -07:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2018-11-21 03:19:56 -08:00
|
|
|
propagatedBuildInputs = [
|
2020-06-03 20:40:59 -07:00
|
|
|
importlib-metadata
|
|
|
|
] ++ lib.optional (pythonOlder "3.4") singledispatch
|
2018-11-21 03:19:56 -08:00
|
|
|
++ lib.optional (pythonOlder "3.5") typing
|
|
|
|
;
|
|
|
|
|
2018-12-27 00:22:53 -08:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
'';
|
2018-11-21 03:19:56 -08:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Read resources from Python packages";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://importlib-resources.readthedocs.io/";
|
2018-11-21 03:19:56 -08:00
|
|
|
license = licenses.asl20;
|
2021-04-28 08:38:29 -07:00
|
|
|
maintainers = [ ];
|
2018-11-21 03:19:56 -08:00
|
|
|
};
|
2020-03-31 18:11:51 -07:00
|
|
|
}
|