2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dateparser
|
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-metadata
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
, shapely
|
|
|
|
, wktutils
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asf-search";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "5.0.2";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asfadmin";
|
|
|
|
repo = "Discovery-asf_search";
|
|
|
|
rev = "refs/tags/v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-Jynks+c8OV0t1GoKAk4vP9jYQ0PclJHl3x8q78au5gk=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dateparser
|
|
|
|
importlib-metadata
|
|
|
|
numpy
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
shapely
|
|
|
|
wktutils
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "WKTUtils==" "WKTUtils>="
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"asf_search"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python wrapper for the ASF SearchAPI";
|
|
|
|
homepage = "https://github.com/asfadmin/Discovery-asf_search";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bzizou ];
|
|
|
|
};
|
|
|
|
}
|