about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-04-24 18:51:26 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-04-24 18:51:26 +0200
commit019cf935eb7beb9fe7d1ebfe271a9b03c0d8740a (patch)
treedb820f4d3ebf7a032d0d8a07e5960132a5860482 /pkgs
parent6942038dbf0f145be840dd18867975df77acbe56 (diff)
python3Packages.smhi-pkg: init at 1.0.14
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/smhi-pkg/default.nix47
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/smhi-pkg/default.nix b/pkgs/development/python-modules/smhi-pkg/default.nix
new file mode 100644
index 0000000000000..3308697cf5498
--- /dev/null
+++ b/pkgs/development/python-modules/smhi-pkg/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, aiohttp
+, buildPythonPackage
+, fetchFromGitHub
+, pytest-asyncio
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "smhi-pkg";
+  version = "1.0.14";
+
+  src = fetchFromGitHub {
+    owner = "joysoftware";
+    repo = "pypi_smhi";
+    rev = version;
+    sha256 = "186xwrg3hvr0hszq2kxvygd241q2sp11gfk6mwj9z4zqywwfcbn3";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+  ];
+
+  checkInputs = [
+    pytest-asyncio
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # Disable tests that needs network access
+    "test_smhi_integration_test"
+    "test_smhi_async_integration_test"
+    "test_smhi_async_integration_test_use_session"
+    "test_smhi_async_get_forecast_integration2"
+    "test_async_error_from_api"
+  ];
+
+  pythonImportsCheck = [ "smhi" ];
+
+  meta = with lib; {
+    description = "Python library for accessing SMHI open forecast data";
+    homepage = "https://github.com/joysoftware/pypi_smhi";
+    changelog = "https://github.com/joysoftware/pypi_smhi/releases/tag/${version}";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index ce472c130a0b4..96f22b7f98676 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -7997,6 +7997,8 @@ in {
 
   smdebug-rulesconfig = callPackage ../development/python-modules/smdebug-rulesconfig { };
 
+  smhi-pkg = callPackage ../development/python-modules/smhi-pkg { };
+
   smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14
 
   smmap = callPackage ../development/python-modules/smmap { };