2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, responses
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dotenv
|
|
|
|
, pytest-rerunfailures
|
|
|
|
, requests
|
|
|
|
, python-dateutil
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2021-05-28 09:39:13 +00:00
|
|
|
, ibm-cloud-sdk-core
|
2022-01-27 00:19:43 +00:00
|
|
|
, pythonOlder
|
2021-05-28 09:39:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ibm-watson";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "6.1.0";
|
2022-01-27 00:19:43 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "watson-developer-cloud";
|
|
|
|
repo = "python-sdk";
|
2022-08-21 13:32:41 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-jvDkAwuDFgo7QlZ8N7TNVsY7+aXdIDc50uIIoO+5MLs=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
python-dateutil
|
|
|
|
websocket-client
|
|
|
|
ibm-cloud-sdk-core
|
|
|
|
];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
checkInputs = [
|
|
|
|
responses
|
|
|
|
pytestCheckHook
|
|
|
|
python-dotenv
|
|
|
|
pytest-rerunfailures
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2021-07-14 22:03:04 +00:00
|
|
|
--replace websocket-client==1.1.0 websocket-client>=1.1.0
|
2021-05-28 09:39:13 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"ibm_watson"
|
|
|
|
];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Client library to use the IBM Watson Services";
|
|
|
|
homepage = "https://github.com/watson-developer-cloud/python-sdk";
|
|
|
|
license = licenses.asl20;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ globin ];
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
}
|