2018-11-21 11:19:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pathlib2
|
|
|
|
, typing
|
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2018-12-27 08:22:53 +00:00
|
|
|
, python
|
2018-11-21 11:19:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "importlib_resources";
|
|
|
|
version = "1.0.2";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "d3279fd0f6f847cced9f7acc19bd3e5df54d34f93a2e7bb5f238f81545787078";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
] ++ lib.optional (!isPy3k) pathlib2
|
|
|
|
++ lib.optional (pythonOlder "3.5") typing
|
|
|
|
;
|
|
|
|
|
2018-12-27 08:22:53 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
'';
|
2018-11-21 11:19:56 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Read resources from Python packages";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://importlib-resources.readthedocs.io/";
|
2018-11-21 11:19:56 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
2020-04-01 01:11:51 +00:00
|
|
|
}
|