about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/devpi-client/default.nix
blob: 50cc41cd50ffb64866de24a6a1da66df5961e226 (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
{ stdenv
, buildPythonApplication
, fetchPypi
# buildInputs
, glibcLocales
, pkginfo
, check-manifest
# propagatedBuildInputs
, py
, devpi-common
, pluggy
, setuptools
# CheckInputs
, pytest
, pytest-flake8
, webtest
, mock
, devpi-server
, tox
, sphinx
, wheel
, git
, mercurial
} :

buildPythonApplication rec {
  pname = "devpi-client";
  version = "5.0.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0hyj3xc5c6658slk5wgcr9rh7hwi5r3hzxk1p6by61sqx5r38v3q";
  };

  buildInputs = [ glibcLocales pkginfo check-manifest ];

  propagatedBuildInputs = [ py devpi-common pluggy setuptools ];

  checkInputs = [
    pytest pytest-flake8 webtest mock
    devpi-server tox
    sphinx wheel git mercurial
  ];

  checkPhase = ''
    export PATH=$PATH:$out/bin
    export HOME=$TMPDIR # fix tests failing in sandbox due to "/homeless-shelter"

    # test_pypi_index_attributes: tries to connect to upstream pypi
    # test_test: setuptools does not get propagated into the tox call (cannot import setuptools), also no detox
    # test_index: hangs forever
    # test_upload: fails multiple times with
    # > assert args[0], args
    # F AssertionError: [None, local('/build/pytest-of-nixbld/pytest-0/test_export_attributes_git_set0/repo2/setupdir/setup.py'), '--name']

    py.test -k 'not test_pypi_index_attributes \
                and not test_test \
                and not test_index \
                and not test_upload' testing
  '';

  LC_ALL = "en_US.UTF-8";

  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 ];
  };

}