1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, certifi
5, configparser
6, cryptography
7, pyopenssl
8, python-dateutil
9, pytz
10}:
11
12buildPythonPackage rec {
13 pname = "oci";
14 version = "2.36.0";
15
16 src = fetchFromGitHub {
17 owner = "oracle";
18 repo = "oci-python-sdk";
19 rev = "v${version}";
20 hash = "sha256-scG/ZhWeiCgXp7iD6arWIN8KZecSjKLsCW4oXeJvx6M=";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace "configparser==4.0.2" "configparser" \
26 --replace "cryptography==3.2.1" "cryptography" \
27 --replace "pyOpenSSL>=17.5.0,<=19.1.0" "pyOpenSSL"
28 '';
29
30 propagatedBuildInputs = [
31 certifi configparser cryptography pyopenssl python-dateutil pytz
32 ];
33
34 # Tests fail: https://github.com/oracle/oci-python-sdk/issues/164
35 doCheck = false;
36
37 pythonImportsCheck = [ "oci" ];
38
39 meta = with lib; {
40 description = "Oracle Cloud Infrastructure Python SDK";
41 homepage = "https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/index.html";
42 maintainers = with maintainers; [ ilian ];
43 license = with licenses; [ asl20 upl ];
44 };
45}