nixpkgs/pkgs/development/python-modules/importlib-resources/default.nix
Robert Schütz 2cae050057
python2Packages: remove superfluous overrides
Since Python 2 is not supported anymore we only keep those overrides
which are used by leaf packages.
2022-01-01 02:10:53 +01:00

48 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 = [ ];
};
}