2cae050057
Since Python 2 is not supported anymore we only keep those overrides which are used by leaf packages.
47 lines
868 B
Nix
47 lines
868 B
Nix
{ lib
|
|
, isPy27
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, setuptools-scm
|
|
, importlib-metadata
|
|
, typing ? null
|
|
, pythonOlder
|
|
, python
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "importlib-resources";
|
|
version = "5.4.0";
|
|
disabled = isPy27;
|
|
|
|
src = fetchPypi {
|
|
pname = "importlib_resources";
|
|
inherit version;
|
|
sha256 = "sha256-11bi+F3U3iuom+CyHboqO77C6HGkKjoWcZJYoR+HUGs=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
importlib-metadata
|
|
] ++ lib.optional (pythonOlder "3.5") [
|
|
typing
|
|
];
|
|
|
|
checkPhase = ''
|
|
${python.interpreter} -m unittest discover
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"importlib_resources"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Read resources from Python packages";
|
|
homepage = "https://importlib-resources.readthedocs.io/";
|
|
license = licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|