about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/packaging/default.nix
blob: 0c4678a460acf73d276731eb4ab8cfe69ae3ef4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, buildPythonPackage
, fetchPypi
, flit-core
, pretend
, pytestCheckHook
, pythonOlder
}:

let
  packaging = buildPythonPackage rec {
    pname = "packaging";
    version = "23.1";
    format = "pyproject";

    disabled = pythonOlder "3.7";

    src = fetchPypi {
      inherit pname version;
      hash = "sha256-o5KYDSts/6ZEQxiYvlSwBFFRMZ0efsNPDP7Uh2fdM08=";
    };

    nativeBuildInputs = [
      flit-core
    ];

    nativeCheckInputs = [
      pytestCheckHook
      pretend
    ];

    # Prevent circular dependency with pytest
    doCheck = false;

    pythonImportsCheck = [ "packaging" ];

    passthru.tests = packaging.overridePythonAttrs (_: { doCheck = true; });

    meta = with lib; {
      description = "Core utilities for Python packages";
      homepage = "https://github.com/pypa/packaging";
      license = with licenses; [ bsd2 asl20 ];
      maintainers = with maintainers; [ bennofs ];
    };
  };
in
packaging