2017-10-25 20:04:35 +02:00
|
|
|
{ stdenv, fetchurl, buildPythonPackage, pip, pytest, click, six, first
|
2017-10-31 22:23:58 +01:00
|
|
|
, setuptools_scm, git, glibcLocales, mock }:
|
2017-10-25 20:04:35 +02:00
|
|
|
|
2017-03-12 19:10:19 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pip-tools";
|
2018-05-09 16:49:23 +02:00
|
|
|
version = "2.0.2";
|
2017-11-09 12:26:09 +01:00
|
|
|
name = pname + "-" + version;
|
2017-03-12 19:10:19 +01:00
|
|
|
|
2017-06-25 18:55:07 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/p/pip-tools/${name}.tar.gz";
|
2018-05-09 16:49:23 +02:00
|
|
|
sha256 = "f11fc3bf1d87a0b4a68d4d595f619814e2396e92d75d7bdd2500edbf002ea6de";
|
2017-03-12 19:10:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2017-10-31 22:23:58 +01:00
|
|
|
checkInputs = [ pytest git glibcLocales mock ];
|
2017-06-25 18:55:07 +02:00
|
|
|
propagatedBuildInputs = [ pip click six first setuptools_scm ];
|
2017-03-12 19:10:19 +01:00
|
|
|
|
2017-11-13 04:33:59 +01:00
|
|
|
disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) [
|
|
|
|
# Depend on network tests:
|
|
|
|
"test_editable_package_vcs"
|
|
|
|
"test_generate_hashes_all_platforms"
|
|
|
|
"test_generate_hashes_without_interfering_with_each_other"
|
|
|
|
"test_realistic_complex_sub_dependencies"
|
2017-12-30 12:25:26 +01:00
|
|
|
"test_generate_hashes_with_editable"
|
2018-04-17 17:26:17 +02:00
|
|
|
"test_filter_pip_markes"
|
|
|
|
"test_get_hashes_local_repository_cache_miss"
|
2017-11-13 04:33:59 +01:00
|
|
|
# Expect specific version of "six":
|
|
|
|
"test_editable_package"
|
|
|
|
"test_input_file_without_extension"
|
2017-12-30 12:25:26 +01:00
|
|
|
"test_locally_available_editable_package_is_not_archived_in_cache_dir"
|
2017-11-13 04:33:59 +01:00
|
|
|
];
|
|
|
|
|
2017-03-12 19:10:19 +01:00
|
|
|
checkPhase = ''
|
2017-10-31 22:23:58 +01:00
|
|
|
export HOME=$(mktemp -d) VIRTUAL_ENV=1
|
|
|
|
tests_without_network_access="
|
2017-11-13 04:33:59 +01:00
|
|
|
not test_realistic_complex_sub_dependencies
|
|
|
|
and not test_editable_package_vcs
|
|
|
|
and not test_generate_hashes_all_platforms
|
|
|
|
and not test_generate_hashes_without_interfering_with_each_other
|
2017-10-31 22:23:58 +01:00
|
|
|
"
|
2017-11-13 04:33:59 +01:00
|
|
|
py.test -k "${disabledTests}"
|
2017-03-12 19:10:19 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Keeps your pinned dependencies fresh";
|
|
|
|
homepage = https://github.com/jazzband/pip-tools/;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
|
|
|
};
|
|
|
|
}
|