about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/devpi-client/default.nix
blob: 66d84e5a3b12757a55d5f8973c87f349152dd3ec (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{ lib
, devpi-server
, git
, glibcLocales
, python3
, fetchPypi
}:

python3.pkgs.buildPythonApplication rec {
  pname = "devpi-client";
  version = "7.0.2";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-oOX5Z8WXgNJYsgXqHE2CsXdDnA3XmDF6axD1D318bPQ=";
  };

  postPatch = ''
    substituteInPlace tox.ini \
      --replace "--flake8" ""
  '';

  nativeBuildInputs = with python3.pkgs; [
    setuptools
    setuptools-changelog-shortener
    wheel
  ];

  buildInputs = [
    glibcLocales
  ];

  propagatedBuildInputs = with python3.pkgs; [
    build
    check-manifest
    devpi-common
    iniconfig
    pkginfo
    pluggy
    platformdirs
  ];

  nativeCheckInputs = [
    devpi-server
    git
  ] ++ (with python3.pkgs; [
    mercurial
    mock
    pypitoken
    pytestCheckHook
    sphinx
    virtualenv
    webtest
    wheel
  ]);

  preCheck = ''
    export HOME=$(mktemp -d);
  '';

  pytestFlagsArray = [
    # --fast skips tests which try to start a devpi-server improperly
    "--fast"
  ];

  LC_ALL = "en_US.UTF-8";

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [
    "devpi"
  ];

  meta = with lib; {
    description = "Client for devpi, a pypi index server and packaging meta tool";
    mainProgram = "devpi";
    homepage = "http://doc.devpi.net";
    changelog = "https://github.com/devpi/devpi/blob/client-${version}/client/CHANGELOG";
    license = licenses.mit;
    maintainers = with maintainers; [ lewo makefu ];
  };
}