depot/third_party/nixpkgs/pkgs/development/python-modules/importlib-resources/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

48 lines
882 B
Nix

{ lib
, isPy27
, buildPythonPackage
, fetchPypi
, setuptools-scm
, importlib-metadata
, typing ? null
, pythonOlder
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "importlib-resources";
version = "6.0.1";
format = "pyproject";
disabled = isPy27;
src = fetchPypi {
pname = "importlib_resources";
inherit version;
hash = "sha256-Q1lFfkJwhGK5YmoEZXxiCK15nOtB5cWMV/+g5qCYpdQ=";
};
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 = [ ];
};
}