about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/oci/default.nix37
-rw-r--r--pkgs/development/python-modules/transip/default.nix38
-rw-r--r--pkgs/tools/admin/lexicon/default.nix25
-rw-r--r--pkgs/tools/admin/oci-cli/default.nix79
4 files changed, 111 insertions, 68 deletions
diff --git a/pkgs/development/python-modules/oci/default.nix b/pkgs/development/python-modules/oci/default.nix
index bdf86c55821c9..2278133582c6d 100644
--- a/pkgs/development/python-modules/oci/default.nix
+++ b/pkgs/development/python-modules/oci/default.nix
@@ -1,45 +1,58 @@
 { lib
-, fetchFromGitHub
 , buildPythonPackage
 , certifi
+, circuitbreaker
 , configparser
 , cryptography
+, fetchFromGitHub
 , pyopenssl
 , python-dateutil
+, pythonOlder
 , pytz
 }:
 
 buildPythonPackage rec {
   pname = "oci";
-  version = "2.52.0";
+  version = "2.53.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "oracle";
     repo = "oci-python-sdk";
     rev = "v${version}";
-    hash = "sha256-4MlelzUPCJCZJQh8sNJHEL0WEcVWktV0TBEY0tdTHmk=";
+    hash = "sha256-TnLKT/F36jHEfT9K6DFM2GmPRccXz1GJWIF+EEQYRls=";
   };
 
+  propagatedBuildInputs = [
+    certifi
+    circuitbreaker
+    configparser
+    cryptography
+    pyopenssl
+    python-dateutil
+    pytz
+  ];
+
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "configparser==4.0.2" "configparser" \
-      --replace "cryptography<=3.4.7,>=3.2.1" "cryptography" \
+      --replace "configparser==4.0.2 ; python_version < '3'" "configparser" \
+      --replace "cryptography>=3.2.1,<=3.4.7" "cryptography" \
       --replace "pyOpenSSL>=17.5.0,<=19.1.0" "pyOpenSSL"
   '';
 
-  propagatedBuildInputs = [
-    certifi configparser cryptography pyopenssl python-dateutil pytz
-  ];
-
   # Tests fail: https://github.com/oracle/oci-python-sdk/issues/164
   doCheck = false;
 
-  pythonImportsCheck = [ "oci" ];
+  pythonImportsCheck = [
+    "oci"
+  ];
 
   meta = with lib; {
     description = "Oracle Cloud Infrastructure Python SDK";
-    homepage = "https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/index.html";
+    homepage = "https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/";
+    license = with licenses; [ asl20 /* or */ upl ];
     maintainers = with maintainers; [ ilian ];
-    license = with licenses; [ asl20 upl ];
   };
 }
diff --git a/pkgs/development/python-modules/transip/default.nix b/pkgs/development/python-modules/transip/default.nix
index 94d3cb85be402..ff37464a0f34e 100644
--- a/pkgs/development/python-modules/transip/default.nix
+++ b/pkgs/development/python-modules/transip/default.nix
@@ -1,36 +1,46 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, isPy27
 , requests
 , cryptography
 , suds-jurko
-, pytest
+, pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
-  pname = "transip-api";
+  pname = "transip";
   version = "2.0.0";
-  disabled = isPy27;
+  format = "setuptools";
+
+  disabled = pythonOlder "3.5";
 
   src = fetchFromGitHub {
     owner = "benkonrath";
-    repo = pname;
+    repo = "transip-api";
     rev = "v${version}";
-    sha256 = "153x8ph7cp432flaqiy2zgp060ddychcqcrssxkcmjvbm86xrz17";
+    hash = "sha256-J/zcDapry8pm1zozzCDzrQED7vvCR6yoE4NcduBFfZQ=";
   };
 
-  checkInputs = [ pytest ];
+  propagatedBuildInputs = [
+    requests
+    cryptography
+    suds-jurko
+  ];
 
-  # Constructor Tests require network access
-  checkPhase = ''
-    pytest --deselect=tests/service_tests/test_domain.py::TestDomainService::test_constructor \
-           --deselect tests/service_tests/test_vps.py::TestVPSService::testConstructor \
-           --deselect tests/service_tests/test_webhosting.py::TestWebhostingService::testConstructor
-  '';
+  checkInputs = [
+    pytestCheckHook
+  ];
 
+  disabledTests = [
+    # Constructor tests require network access
+    "test_constructor"
+    "testConstructor"
+  ];
 
-  propagatedBuildInputs = [ requests cryptography suds-jurko ];
+  pythonImportsCheck = [
+    "transip"
+  ];
 
   meta = with lib; {
     description = "TransIP API Connector";
diff --git a/pkgs/tools/admin/lexicon/default.nix b/pkgs/tools/admin/lexicon/default.nix
index c183e37414291..4d48110e9674d 100644
--- a/pkgs/tools/admin/lexicon/default.nix
+++ b/pkgs/tools/admin/lexicon/default.nix
@@ -31,18 +31,18 @@ in
 
 buildPythonApplication rec {
   pname = "lexicon";
-  version = "3.5.2";
+  version = "3.9.0";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "AnalogJ";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1jsc2ybbf3mbvgzkgliria494dpj23mgqnw2lh43cnd9rgsjvzn3";
+    hash = "sha256-qJFHwFzFjZVdQv4YfrlR2cMQHsEtpQbvg/DMo6C5/z0=";
   };
 
   nativeBuildInputs = [
-    poetry
+    poetry-core
   ];
 
   propagatedBuildInputs = [
@@ -52,6 +52,7 @@ buildPythonApplication rec {
     dnspython
     future
     localzone
+    oci
     pynamecheap
     pyyaml
     requests
@@ -64,20 +65,24 @@ buildPythonApplication rec {
 
   checkInputs = [
     mock
-    pytest
-    pytest-cov
+    pytestCheckHook
     pytest-xdist
     vcrpy
   ];
 
-  checkPhase = ''
-    pytest --ignore=lexicon/tests/providers/test_auto.py
-  '';
+  disabledTestPaths = [
+    # Tests require network access
+    "lexicon/tests/providers/test_auto.py"
+  ];
+
+  pythonImportsCheck = [
+    "lexicon"
+  ];
 
   meta = with lib; {
-    description = "Manipulate DNS records on various DNS providers in a standardized way";
+    description = "Manipulate DNS records of various DNS providers in a standardized way";
     homepage = "https://github.com/AnalogJ/lexicon";
-    maintainers = with maintainers; [ flyfloh ];
     license = licenses.mit;
+    maintainers = with maintainers; [ flyfloh ];
   };
 }
diff --git a/pkgs/tools/admin/oci-cli/default.nix b/pkgs/tools/admin/oci-cli/default.nix
index 729f0aa8fd917..7abea7ae92533 100644
--- a/pkgs/tools/admin/oci-cli/default.nix
+++ b/pkgs/tools/admin/oci-cli/default.nix
@@ -1,59 +1,74 @@
-{ lib, fetchFromGitHub, python3Packages, locale }:
+{ lib
+, fetchFromGitHub
+, python3
+}:
 
 let
-  # https://github.com/oracle/oci-cli/issues/189
-  pinned_click = python3Packages.click.overridePythonAttrs (old: rec {
-    pname = "click";
-    version = "6.7";
-    src = python3Packages.fetchPypi {
-      inherit pname version;
-      hash = "sha256-8VUW30eNWlYYD7+A5o8gYBDm0WD8OfpQi2XgNf11Ews=";
-    };
+  py = python3.override {
+    packageOverrides = self: super: {
+
+      click = super.click.overridePythonAttrs (oldAttrs: rec {
+        version = "7.1.2";
 
-    postPatch = ''
-      substituteInPlace click/_unicodefun.py \
-      --replace "'locale'" "'${locale}/bin/locale'"
-    '';
+        src = oldAttrs.src.override {
+          inherit version;
+          hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
+        };
+      });
 
-    # Issue that wasn't resolved when this version was released:
-    # https://github.com/pallets/click/issues/823
-    doCheck = false;
-  });
+    };
+  };
 in
+with py.pkgs;
 
-python3Packages.buildPythonApplication rec {
+buildPythonApplication rec {
   pname = "oci-cli";
-  version = "2.23.0";
+  version = "3.4.1";
+  format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "oracle";
     repo = "oci-cli";
     rev = "v${version}";
-    hash = "sha256-XRkycJrUSOZQAGiSyQZGA/SnlxnFumYL82kOkYd7s2o=";
+    hash = "sha256-ibk5WfNPa02D7UcP+4xg8Pi9P45yUPEm56l76IwNuRE=";
   };
 
-  propagatedBuildInputs = with python3Packages; [
-    oci arrow certifi pinned_click configparser cryptography jmespath python-dateutil
-    pytz retrying six terminaltables pyopenssl pyyaml
+  propagatedBuildInputs = [
+    arrow
+    certifi
+    click
+    configparser
+    cryptography
+    jmespath
+    oci
+    pyopenssl
+    python-dateutil
+    pytz
+    pyyaml
+    retrying
+    six
+    terminaltables
   ];
 
-  # https://github.com/oracle/oci-cli/issues/187
-  doCheck = false;
-
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "configparser==4.0.2" "configparser" \
-      --replace "cryptography==3.2.1" "cryptography" \
+      --replace "cryptography>=3.2.1,<=3.4.7" "cryptography" \
       --replace "pyOpenSSL==19.1.0" "pyOpenSSL" \
-      --replace "PyYAML==5.3.1" "PyYAML" \
-      --replace "six==1.14.0" "six" \
-      --replace "arrow==0.17.0" "arrow"
+      --replace "PyYAML>=5.4,<6" "PyYAML" \
+      --replace "terminaltables==3.1.0" "terminaltables"
   '';
 
+  # https://github.com/oracle/oci-cli/issues/187
+  doCheck = false;
+
+  pythonImportsCheck = [
+    " oci_cli "
+  ];
+
   meta = with lib; {
     description = "Command Line Interface for Oracle Cloud Infrastructure";
     homepage = "https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm";
+    license = with licenses; [ asl20 /* or */ upl ];
     maintainers = with maintainers; [ ilian ];
-    license = with licenses; [ asl20 upl ];
   };
 }