567e8dfd8e
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>
66 lines
1.3 KiB
Nix
66 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
pythonOlder,
|
|
|
|
# build-system
|
|
flit-core,
|
|
|
|
# tests
|
|
pretend,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
let
|
|
packaging = buildPythonPackage rec {
|
|
pname = "packaging";
|
|
version = "25.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-1EOHLJjWd79g9qHy+MHLdI6P52LSv50xSLVZkpWw/E8=";
|
|
};
|
|
|
|
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 = {
|
|
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 lib.licenses; [
|
|
bsd2
|
|
asl20
|
|
];
|
|
maintainers = with lib.maintainers; [ bennofs ];
|
|
teams = [ lib.teams.python ];
|
|
};
|
|
};
|
|
in
|
|
packaging
|