mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
0215034f25
when they already rely on SRI hashes.
49 lines
883 B
Nix
49 lines
883 B
Nix
{ lib
|
|
, isPy27
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, setuptools-scm
|
|
, importlib-metadata
|
|
, typing ? null
|
|
, pythonOlder
|
|
, unittestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "importlib-resources";
|
|
version = "5.12.0";
|
|
format = "pyproject";
|
|
disabled = isPy27;
|
|
|
|
src = fetchPypi {
|
|
pname = "importlib_resources";
|
|
inherit version;
|
|
hash = "sha256-S+glib9cHXmZrt8qRRWdEMs8pPGbInH4eSvI5tp7IvY=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
importlib-metadata
|
|
] ++ lib.optionals (pythonOlder "3.5") [
|
|
typing
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
unittestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"importlib_resources"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Read resources from Python packages";
|
|
homepage = "https://importlib-resources.readthedocs.io/";
|
|
license = licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|