1{ lib
2, attrs
3, buildPythonPackage
4, fetchPypi
5, httpx
6, iso8601
7, pydantic
8, pyjwt
9, pytest-asyncio
10, pytestCheckHook
11, python-dateutil
12, pythonOlder
13, respx
14, retrying
15, rfc3339
16, toml
17}:
18
19buildPythonPackage rec {
20 pname = "qcs-api-client";
21 version = "0.20.1";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchPypi {
27 inherit pname version;
28 sha256 = "sha256-rlDquNKWnmP8d3pxmFfViDN++8x59h6bGXBJv//q/dk=";
29 };
30
31 propagatedBuildInputs = [
32 attrs
33 httpx
34 iso8601
35 pydantic
36 pyjwt
37 python-dateutil
38 retrying
39 rfc3339
40 toml
41 ];
42
43 checkInputs = [
44 pytest-asyncio
45 pytestCheckHook
46 respx
47 ];
48
49 postPatch = ''
50 substituteInPlace setup.py \
51 --replace "attrs>=20.1.0,<21.0.0" "attrs" \
52 --replace "httpx>=0.15.0,<0.16.0" "httpx" \
53 --replace "pyjwt>=1.7.1,<2.0.0" "pyjwt"
54 '';
55
56 # Project has no tests
57 doCheck = false;
58
59 pythonImportsCheck = [
60 "qcs_api_client"
61 ];
62
63 meta = with lib; {
64 description = "Python library for accessing the Rigetti QCS API";
65 homepage = "https://pypi.org/project/qcs-api-client/";
66 license = licenses.asl20;
67 maintainers = with maintainers; [ fab ];
68 };
69}