Files
nixpkgs/pkgs/development/python-modules/importlib-metadata/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

58 lines
1020 B
Nix

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