1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, responses
5, pytestCheckHook
6, python-dotenv
7, pytest-rerunfailures
8, requests
9, python-dateutil
10, websocket-client
11, ibm-cloud-sdk-core
12, pythonOlder
13}:
14
15buildPythonPackage rec {
16 pname = "ibm-watson";
17 version = "6.1.0";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "watson-developer-cloud";
24 repo = "python-sdk";
25 rev = "refs/tags/v${version}";
26 sha256 = "sha256-jvDkAwuDFgo7QlZ8N7TNVsY7+aXdIDc50uIIoO+5MLs=";
27 };
28
29 propagatedBuildInputs = [
30 requests
31 python-dateutil
32 websocket-client
33 ibm-cloud-sdk-core
34 ];
35
36 checkInputs = [
37 responses
38 pytestCheckHook
39 python-dotenv
40 pytest-rerunfailures
41 ];
42
43 postPatch = ''
44 substituteInPlace setup.py \
45 --replace websocket-client==1.1.0 websocket-client>=1.1.0
46 '';
47
48 pythonImportsCheck = [
49 "ibm_watson"
50 ];
51
52 meta = with lib; {
53 description = "Client library to use the IBM Watson Services";
54 homepage = "https://github.com/watson-developer-cloud/python-sdk";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ globin ];
57 };
58}