1{ lib
2, buildPythonPackage
3, isPy27
4, fetchPypi
5, setuptools
6, setuptools-scm
7, wheel
8, pytestCheckHook
9, packaging
10, platformdirs
11, requests
12, tqdm
13, paramiko
14, xxhash
15}:
16
17buildPythonPackage rec {
18 pname = "pooch";
19 version = "1.7.0";
20 format = "pyproject";
21
22 disabled = isPy27;
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-8XShBBtkR/Du+IYPdtF/YO0vhX3A76OHp/CCKK8F2Zg=";
27 };
28
29 nativeBuildInputs = [
30 setuptools
31 setuptools-scm
32 wheel
33 ];
34
35 propagatedBuildInputs = [
36 packaging
37 platformdirs
38 requests
39 ];
40
41 passthru = {
42 optional-dependencies = {
43 progress = [ tqdm ];
44 sftp = [ paramiko ];
45 xxhash = [ xxhash ];
46 };
47 };
48 preCheck = ''
49 export HOME=$TMPDIR
50 '';
51
52 nativeCheckInputs = [
53 pytestCheckHook
54 ];
55
56 # tries to touch network
57 disabledTests = [
58 "check_availability"
59 "decompress"
60 "downloader"
61 "extractprocessor_fails"
62 "integration"
63 "pooch_corrupted"
64 "pooch_custom_url"
65 "pooch_download"
66 "pooch_logging_level"
67 "pooch_update"
68 "processor"
69 "test_fetch"
70 "test_load_registry_from_doi"
71 "test_retrieve"
72 "test_stream_download"
73
74 ];
75
76 meta = with lib; {
77 description = "A friend to fetch your data files.";
78 homepage = "https://github.com/fatiando/pooch";
79 license = licenses.bsd3;
80 maintainers = with maintainers; [ GuillaumeDesforges ];
81 };
82
83}