depot/third_party/nixpkgs/pkgs/development/python-modules/packaging/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

64 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
# build-system
flit-core,
# tests
pretend,
pytestCheckHook,
}:
let
packaging = buildPythonPackage rec {
pname = "packaging";
version = "24.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-Am7XLI7T/M5b+JUFciWGmJJ/0dvaEKXpgc3wrDf08AI=";
};
nativeBuildInputs = [ flit-core ];
nativeCheckInputs = [
pytestCheckHook
pretend
];
pythonImportsCheck = [
"packaging"
"packaging.metadata"
"packaging.requirements"
"packaging.specifiers"
"packaging.tags"
"packaging.version"
];
# Prevent circular dependency with pytest
doCheck = false;
passthru.tests = packaging.overridePythonAttrs (_: {
doCheck = true;
});
meta = with lib; {
changelog = "https://github.com/pypa/packaging/blob/${version}/CHANGELOG.rst";
description = "Core utilities for Python packages";
downloadPage = "https://github.com/pypa/packaging";
homepage = "https://packaging.pypa.io/";
license = with licenses; [
bsd2
asl20
];
maintainers = teams.python.members ++ (with maintainers; [ bennofs ]);
};
};
in
packaging