1{ lib
2, buildPythonPackage
3, fetchPypi
4, flit-core
5, pretend
6, pytestCheckHook
7, pythonOlder
8}:
9
10let
11 packaging = buildPythonPackage rec {
12 pname = "packaging";
13 version = "23.1";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-o5KYDSts/6ZEQxiYvlSwBFFRMZ0efsNPDP7Uh2fdM08=";
21 };
22
23 nativeBuildInputs = [
24 flit-core
25 ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 pretend
30 ];
31
32 # Prevent circular dependency with pytest
33 doCheck = false;
34
35 pythonImportsCheck = [ "packaging" ];
36
37 passthru.tests = packaging.overridePythonAttrs (_: { doCheck = true; });
38
39 meta = with lib; {
40 description = "Core utilities for Python packages";
41 homepage = "https://github.com/pypa/packaging";
42 license = with licenses; [ bsd2 asl20 ];
43 maintainers = with maintainers; [ bennofs ];
44 };
45 };
46in
47packaging