ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / qcs-api-client / default.nix
blob22e29ce3a762cb7ba3c0b7913ec38cc7bf84931b
1 { lib
2 , attrs
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch
6 , httpx
7 , iso8601
8 , poetry-core
9 , pydantic
10 , pyjwt
11 , pytest-asyncio
12 , pytestCheckHook
13 , python-dateutil
14 , pythonOlder
15 , respx
16 , retrying
17 , rfc3339
18 , toml
21 buildPythonPackage rec {
22   pname = "qcs-api-client";
23   version = "0.21.2";
24   format = "pyproject";
26   disabled = pythonOlder "3.7";
28   src = fetchFromGitHub {
29     owner = "rigetti";
30     repo = "qcs-api-client-python";
31     rev = "refs/tags/v${version}";
32     hash = "sha256-gQow1bNRPhUm4zRu2T5FpcgOTcS2F1TQIz8WP1K0Xww=";
33   };
35   nativeBuildInputs = [
36     poetry-core
37   ];
39   propagatedBuildInputs = [
40     attrs
41     httpx
42     iso8601
43     pydantic
44     pyjwt
45     python-dateutil
46     retrying
47     rfc3339
48     toml
49   ];
51   checkInputs = [
52     pytest-asyncio
53     pytestCheckHook
54     respx
55   ];
57   patches = [
58     # Switch to poetry-core, https://github.com/rigetti/qcs-api-client-python/pull/2
59     (fetchpatch {
60       name = "switch-to-poetry-core.patch";
61       url = "https://github.com/rigetti/qcs-api-client-python/commit/32f0b3c7070a65f4edf5b2552648d88435469e44.patch";
62       hash = "sha256-mOc+Q/5cmwPziojtxeEMWWHSDvqvzZlNRbPtOSeTinQ=";
63     })
64   ];
66   postPatch = ''
67     substituteInPlace pyproject.toml \
68       --replace 'attrs = "^20.1.0"' 'attrs = "*"' \
69       --replace 'httpx = "^0.15.0"' 'httpx = "*"' \
70       --replace 'iso8601 = "^0.1.13"' 'iso8601 = "*"' \
71       --replace 'pydantic = "^1.7.2"' 'pydantic = "*"' \
72       --replace 'pyjwt = "^1.7.1"' 'pyjwt = "*"'
73   '';
75   disabledTestPaths = [
76     # Test is outdated
77     "tests/test_client/test_additional_properties.py"
78     "tests/test_client/test_auth.py"
79     "tests/test_client/test_client.py"
80     "tests/test_client/test_datetime.py"
81     "tests/test_imports.py"
82   ];
84   pythonImportsCheck = [
85     "qcs_api_client"
86   ];
88   meta = with lib; {
89     description = "Python library for accessing the Rigetti QCS API";
90     homepage = "https://qcs-api-client-python.readthedocs.io/";
91     license = licenses.asl20;
92     maintainers = with maintainers; [ fab ];
93   };