about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/devpi-client/default.nix
blob: 3108ffdcbba9ceb95d8dc0aa36301ad64c761d15 (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
{ stdenv
, pythonPackages
, glibcLocales
, devpi-server
, git
, mercurial
} :

pythonPackages.buildPythonApplication rec {
  pname = "devpi-client";
  version = "4.1.0";

  src = pythonPackages.fetchPypi {
    inherit pname version;
    sha256 = "0f5jkvxx9fl8v5vwbwmplqhjsdfgiib7j3zvn0zxd8krvi2s38fq";
  };

  checkInputs = with pythonPackages; [
                    pytest pytest-flakes webtest mock
                    devpi-server tox
                    sphinx wheel git mercurial detox
                    setuptools
                    ];
  checkPhase = ''
    export PATH=$PATH:$out/bin
    export HOME=$TMPDIR # fix tests failing in sandbox due to "/homeless-shelter"

    # setuptools do not get propagated into the tox call (cannot import setuptools)
    rm testing/test_test.py

    # test_pypi_index_attributes tries to connect to upstream pypi
    py.test -k 'not test_pypi_index_attributes' testing
  '';

  LC_ALL = "en_US.UTF-8";
  buildInputs = with pythonPackages; [ glibcLocales pkginfo check-manifest ];
  propagatedBuildInputs = with pythonPackages; [ py devpi-common pluggy setuptools ];

  meta = with stdenv.lib; {
    homepage = http://doc.devpi.net;
    description = "Client for devpi, a pypi index server and packaging meta tool";
    license = licenses.mit;
    maintainers = with maintainers; [ lewo makefu ];
  };

}