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