depot/third_party/nixpkgs/pkgs/development/python-modules/importlib-metadata/default.nix
Default email 22017988c6 Project import generated by Copybara.
GitOrigin-RevId: c777cdf5c564015d5f63b09cc93bef4178b19b01
2022-04-27 11:35:20 +02:00

50 lines
953 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, setuptools
, setuptools-scm
, typing-extensions
, toml
, zipp
}:
buildPythonPackage rec {
pname = "importlib-metadata";
version = "4.11.3";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "importlib_metadata";
inherit version;
hash = "sha256-6kxZfr83FC+Ce485KZV54xaFwx06Q4tZ9GlAav0PJTk=";
};
nativeBuildInputs = [
setuptools # otherwise cross build fails
setuptools-scm
];
propagatedBuildInputs = [
toml
zipp
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
# Cyclic dependencies due to pyflakefs
doCheck = false;
pythonImportsCheck = [
"importlib_metadata"
];
meta = with lib; {
description = "Read metadata from Python packages";
homepage = "https://importlib-metadata.readthedocs.io/";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}