about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pip-api/default.nix
blob: 562f701dece7fdf05010e669defa34751d7f012e (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
48
49
50
51
52
53
54
55
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pip,
  pretend,
  pytestCheckHook,
  pythonOlder,
  setuptools,
  virtualenv,
}:

buildPythonPackage rec {
  pname = "pip-api";
  version = "0.0.34";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "di";
    repo = "pip-api";
    rev = "refs/tags/${version}";
    hash = "sha256-nmCP4hp+BsD80OBjerOu+QTBBExGHvn/v19od4V3ncI=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [ pip ];

  nativeCheckInputs = [
    pretend
    pytestCheckHook
    virtualenv
  ];

  pythonImportsCheck = [ "pip_api" ];

  disabledTests = [
    "test_hash"
    "test_hash_default_algorithm_is_256"
    "test_installed_distributions"
    "test_invoke_install"
    "test_invoke_uninstall"
    "test_isolation"
  ];

  meta = with lib; {
    description = "Importable pip API";
    homepage = "https://github.com/di/pip-api";
    changelog = "https://github.com/di/pip-api/blob/${version}/CHANGELOG";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}