summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/awsiotpythonsdk/default.nix27
-rw-r--r--pkgs/development/python-modules/fnvhash/default.nix28
-rw-r--r--pkgs/development/python-modules/pubnub/default.nix57
-rw-r--r--pkgs/development/python-modules/pubnubsub-handler/default.nix34
-rw-r--r--pkgs/development/python-modules/pytest-vcr/default.nix36
-rw-r--r--pkgs/development/python-modules/rachiopy/default.nix35
-rw-r--r--pkgs/development/python-modules/snappergui/default.nix30
-rw-r--r--pkgs/development/python-modules/swisshydrodata/default.nix28
-rw-r--r--pkgs/development/python-modules/ufoprocessor/default.nix11
9 files changed, 253 insertions, 33 deletions
diff --git a/pkgs/development/python-modules/awsiotpythonsdk/default.nix b/pkgs/development/python-modules/awsiotpythonsdk/default.nix
new file mode 100644
index 00000000000..68b44ea5a5d
--- /dev/null
+++ b/pkgs/development/python-modules/awsiotpythonsdk/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+}:
+
+buildPythonPackage rec {
+  pname = "AWSIoTPythonSDK";
+  version = "1.4.9";
+
+  src = fetchFromGitHub {
+    owner = "aws";
+    repo = "aws-iot-device-sdk-python";
+    rev = "v${version}";
+    sha256 = "0mbppz1lnia4br5vjz1l4z4vw47y3bzcfpckzhs9lxhj4vq6d001";
+  };
+
+  # Project has no tests
+  doCheck = false;
+  pythonImportsCheck = [ "AWSIoTPythonSDK" ];
+
+  meta = with lib; {
+    description = "Python SDK for connecting to AWS IoT";
+    homepage = "https://github.com/aws/aws-iot-device-sdk-python";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/fnvhash/default.nix b/pkgs/development/python-modules/fnvhash/default.nix
new file mode 100644
index 00000000000..d506b51a92c
--- /dev/null
+++ b/pkgs/development/python-modules/fnvhash/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "fnvhash";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "znerol";
+    repo = "py-fnvhash";
+    rev = "v${version}";
+    sha256 = "00h8i70qd3dpsyf2dp7fkcb9m2prd6m3l33qv3wf6idpnqgjz6fq";
+  };
+
+  checkInputs = [ pytestCheckHook ];
+
+  pythonImportsCheck = [ "fnvhash" ];
+
+  meta = with lib; {
+    description = "Python FNV hash implementation";
+    homepage = "https://github.com/znerol/py-fnvhash";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/pubnub/default.nix b/pkgs/development/python-modules/pubnub/default.nix
new file mode 100644
index 00000000000..e4bab25fd9c
--- /dev/null
+++ b/pkgs/development/python-modules/pubnub/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, aiohttp
+, buildPythonPackage
+, cbor2
+, fetchFromGitHub
+, pycryptodomex
+, pytestCheckHook
+, pyyaml
+, pytest-vcr
+, pytest-asyncio
+, requests
+, six
+}:
+
+buildPythonPackage rec {
+  pname = "pubnub";
+  version = "4.8.0";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = "python";
+    rev = "v${version}";
+    sha256 = "16wjal95042kh5fxhvji0rwmw892pacqcnyms520mw15wcwilqir";
+  };
+
+  propagatedBuildInputs = [
+    cbor2
+    pycryptodomex
+    requests
+    six
+  ];
+
+  checkInputs = [
+    aiohttp
+    pycryptodomex
+    pytest-asyncio
+    pytestCheckHook
+    pytest-vcr
+
+  ];
+
+  # Some tests don't pass with recent releases of tornado/twisted
+  pytestFlagsArray = [
+    "--ignore tests/integrational"
+    "--ignore tests/manual/asyncio"
+    "--ignore tests/manual/tornado/test_reconnections.py"
+  ];
+
+  pythonImportsCheck = [ "pubnub" ];
+
+  meta = with lib; {
+    description = "Python-based APIs for PubNub";
+    homepage = "https://github.com/pubnub/python";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/pubnubsub-handler/default.nix b/pkgs/development/python-modules/pubnubsub-handler/default.nix
new file mode 100644
index 00000000000..32ad2a8e1b8
--- /dev/null
+++ b/pkgs/development/python-modules/pubnubsub-handler/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pubnub
+, pycryptodomex
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "pubnubsub-handler";
+  version = "1.0.9";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256:1c44x19zi709sazgl060nkqa7vbaf3iyhwcnwdykhsbipvp6bscy";
+  };
+
+  propagatedBuildInputs = [
+    pubnub
+    pycryptodomex
+    requests
+  ];
+
+  # Project has no tests
+  doCheck = false;
+  pythonImportsCheck = [ "pubnubsubhandler" ];
+
+  meta = with lib; {
+    description = "PubNub subscription between PubNub and Home Assistant";
+    homepage = "https://github.com/w1ll1am23/pubnubsub-handler";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/pytest-vcr/default.nix b/pkgs/development/python-modules/pytest-vcr/default.nix
new file mode 100644
index 00000000000..9373c597b36
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-vcr/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pytest
+, vcrpy
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-vcr";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "ktosiek";
+    repo = pname;
+    rev = version;
+    sha256 = "1i6fin91mklvbi8jzfiswvwf1m91f43smpj36a17xrzk4gisfs6i";
+  };
+
+  propagatedBuildInputs = [
+    pytest
+    vcrpy
+   ];
+
+  # Tests are using an obsolete attribute 'config'
+  # https://github.com/ktosiek/pytest-vcr/issues/43
+  doCheck = false;
+  pythonImportsCheck = [ "pytest_vcr" ];
+
+  meta = with lib; {
+    description = "Integration VCR.py into pytest";
+    homepage = "https://github.com/ktosiek/pytest-vcr";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/rachiopy/default.nix b/pkgs/development/python-modules/rachiopy/default.nix
new file mode 100644
index 00000000000..3fcf773e83d
--- /dev/null
+++ b/pkgs/development/python-modules/rachiopy/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, requests
+, buildPythonPackage
+, fetchFromGitHub
+, jsonschema
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "rachiopy";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "rfverbruggen";
+    repo = pname;
+    rev = version;
+    sha256 = "1d5v9qc7ymzns3ivc5fzwxnxz9sjkhklh57cw05va95mpk5kdskc";
+  };
+
+  propagatedBuildInputs = [ requests ];
+
+  checkInputs = [
+    jsonschema
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "rachiopy" ];
+
+  meta = with lib; {
+    description = "Python client for Rachio Irrigation controller";
+    homepage = "https://github.com/rfverbruggen/rachiopy";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/snappergui/default.nix b/pkgs/development/python-modules/snappergui/default.nix
deleted file mode 100644
index d63390185a9..00000000000
--- a/pkgs/development/python-modules/snappergui/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ lib, stdenv
-, buildPythonPackage
-, fetchgit
-, pygobject3
-, dbus-python
-}:
-
-buildPythonPackage {
-  pname = "Snapper-GUI";
-  version = "0.1";
-
-  src = fetchgit {
-    url = "https://github.com/ricardomv/snapper-gui";
-    rev = "11d98586b122180c75a86fccda45c4d7e3137591";
-    sha256 = "7a9f86fc17dbf130526e70c3e925eac30e2c74d6b932efbf7e7cd9fbba6dc4b1";
-  };
-
-  # no tests available
-  doCheck = false;
-
-  propagatedBuildInputs = [ pygobject3 dbus-python ];
-
-  meta = with lib; {
-    homepage = "https://github.com/ricardomv/snapper-gui";
-    description = "Graphical frontend for snapper";
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ tstrobel ];
-  };
-
-}
diff --git a/pkgs/development/python-modules/swisshydrodata/default.nix b/pkgs/development/python-modules/swisshydrodata/default.nix
new file mode 100644
index 00000000000..f4f191d2b42
--- /dev/null
+++ b/pkgs/development/python-modules/swisshydrodata/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "swisshydrodata";
+  version = "0.0.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1adpy6k2bknffzl5rckqpvaqyrvc00d6a4a4541438dqasx61npl";
+  };
+
+  propagatedBuildInputs = [ requests ];
+
+  # Tests are not releases at the moment
+  doCheck = false;
+  pythonImportsCheck = [ "swisshydrodata" ];
+
+  meta = with lib; {
+    description = "Python client to get data from the Swiss federal Office for Environment FEON";
+    homepage = "https://github.com/bouni/swisshydrodata";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/development/python-modules/ufoprocessor/default.nix b/pkgs/development/python-modules/ufoprocessor/default.nix
index 85b70833bd6..b0f5b11ad3a 100644
--- a/pkgs/development/python-modules/ufoprocessor/default.nix
+++ b/pkgs/development/python-modules/ufoprocessor/default.nix
@@ -26,9 +26,14 @@ buildPythonPackage rec {
     mutatormath
   ];
 
-  # tests require custom commands to run
-  doCheck = false;
-  pythonImportsCheck = [ "ufoProcessor" ];
+  checkPhase = ''
+    runHook preCheck
+    for t in Tests/*.py; do
+      # https://github.com/LettError/ufoProcessor/issues/32
+      [[ "$(basename "$t")" = "tests_fp.py" ]] || python "$t"
+    done
+    runHook postCheck
+  '';
 
   meta = with lib; {
     description = "Read, write and generate UFOs with designspace data";