2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-12-07 07:45:13 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-01-13 08:15:51 +00:00
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
2023-03-15 16:39:30 +00:00
|
|
|
, flit-core
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# tests
|
2023-03-15 16:39:30 +00:00
|
|
|
, pretend
|
2020-12-07 07:45:13 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
let
|
|
|
|
packaging = buildPythonPackage rec {
|
|
|
|
pname = "packaging";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "24.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-64LF4+ViCQdHZuaIW7BLjDigwBXQowA26+fs40yZiek=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
flit-core
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pretend
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"packaging"
|
|
|
|
"packaging.metadata"
|
|
|
|
"packaging.requirements"
|
|
|
|
"packaging.specifiers"
|
|
|
|
"packaging.tags"
|
|
|
|
"packaging.version"
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
# Prevent circular dependency with pytest
|
2022-04-27 09:35:20 +00:00
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests = packaging.overridePythonAttrs (_: { doCheck = true; });
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/pypa/packaging/blob/${version}/CHANGELOG.rst";
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "Core utilities for Python packages";
|
2024-01-13 08:15:51 +00:00
|
|
|
downloadPage = "https://github.com/pypa/packaging";
|
|
|
|
homepage = "https://packaging.pypa.io/";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = with licenses; [ bsd2 asl20 ];
|
2024-01-13 08:15:51 +00:00
|
|
|
maintainers = teams.python.members ++ (with maintainers; [ bennofs ]);
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-04-27 09:35:20 +00:00
|
|
|
in
|
|
|
|
packaging
|