1{ lib
2, buildPythonPackage
3, dateparser
4, fetchFromGitHub
5, importlib-metadata
6, numpy
7, pytestCheckHook
8, python-dateutil
9, pythonOlder
10, pytz
11, requests
12, requests-mock
13, shapely
14, wktutils
15}:
16
17buildPythonPackage rec {
18 pname = "asf-search";
19 version = "5.0.2";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "asfadmin";
26 repo = "Discovery-asf_search";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-Jynks+c8OV0t1GoKAk4vP9jYQ0PclJHl3x8q78au5gk=";
29 };
30
31 propagatedBuildInputs = [
32 dateparser
33 importlib-metadata
34 numpy
35 python-dateutil
36 pytz
37 requests
38 shapely
39 wktutils
40 ];
41
42 checkInputs = [
43 pytestCheckHook
44 requests-mock
45 ];
46
47 postPatch = ''
48 substituteInPlace setup.py \
49 --replace "WKTUtils==" "WKTUtils>="
50 '';
51
52 pythonImportsCheck = [
53 "asf_search"
54 ];
55
56 meta = with lib; {
57 description = "Python wrapper for the ASF SearchAPI";
58 homepage = "https://github.com/asfadmin/Discovery-asf_search";
59 license = licenses.bsd3;
60 maintainers = with maintainers; [ bzizou ];
61 };
62}