1{ stdenv, fetchPypi, buildPythonPackage, pip, pytest, click, six
2, setuptools_scm, git, glibcLocales, mock }:
3
4buildPythonPackage rec {
5 pname = "pip-tools";
6 version = "5.3.1";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "5672c2b6ca0f1fd803f3b45568c2cf7fadf135b4971e7d665232b2075544c0ef";
11 };
12
13 LC_ALL = "en_US.UTF-8";
14 checkInputs = [ pytest git glibcLocales mock ];
15 propagatedBuildInputs = [ pip click six setuptools_scm ];
16
17 disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) [
18 # Depend on network tests:
19 "test_allow_unsafe_option" #paramaterized, but all fail
20 "test_annotate_option" #paramaterized, but all fail
21 "test_editable_package_vcs"
22 "test_editable_top_level_deps_preserved" # can't figure out how to select only one parameter to ignore
23 "test_filter_pip_markers"
24 "test_filter_pip_markes"
25 "test_generate_hashes_all_platforms"
26 "test_generate_hashes_verbose"
27 "test_generate_hashes_with_editable"
28 "test_generate_hashes_with_url"
29 "test_generate_hashes_without_interfering_with_each_other"
30 "test_get_file_hash_without_interfering_with_each_other"
31 "test_get_hashes_local_repository_cache_miss"
32 "test_realistic_complex_sub_dependencies"
33 "test_stdin"
34 "test_upgrade_packages_option"
35 "test_url_package"
36 "test_editable_package"
37 "test_locally_available_editable_package_is_not_archived_in_cache_dir"
38 ];
39
40 checkPhase = ''
41 export HOME=$(mktemp -d) VIRTUAL_ENV=1
42 py.test -k "${disabledTests}"
43 '';
44
45 meta = with stdenv.lib; {
46 description = "Keeps your pinned dependencies fresh";
47 homepage = "https://github.com/jazzband/pip-tools/";
48 license = licenses.bsd3;
49 maintainers = with maintainers; [ zimbatm ];
50 };
51}