about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2022-07-12 09:56:46 +0200
committerGitHub <noreply@github.com>2022-07-12 09:56:46 +0200
commit47db889df9a28ddd8f878d931f26290c50664554 (patch)
tree851b3c1d782b3096a32f7d734ea5c06d681f8e7b /pkgs/development
parente11544e53ec982d1549891b1fbebf3d2a0a71f2c (diff)
parent0d5757c9cb1bbf8d0a318b3ede87367240f7158e (diff)
Merge pull request #181167 from fabaff/timezonefinder-bump
python310Packages.timezonefinder: 5.2.0 -> 6.0.2
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/timezonefinder/default.nix51
1 files changed, 39 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/timezonefinder/default.nix b/pkgs/development/python-modules/timezonefinder/default.nix
index 1cd055588c28b..f5dc5f7c346f7 100644
--- a/pkgs/development/python-modules/timezonefinder/default.nix
+++ b/pkgs/development/python-modules/timezonefinder/default.nix
@@ -1,33 +1,60 @@
-{ buildPythonPackage
-, lib
-, fetchPypi
-, isPy27
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, h3
 , numba
 , numpy
+, poetry-core
 , pytestCheckHook
-, pytest-cov
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "timezonefinder";
-  version = "5.2.0";
+  version = "6.0.2";
+  format = "pyproject";
 
-  disabled = isPy27;
+  disabled = pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "a374570295a8dbd923630ce85f754e52578e288cb0a9cf575834415e84758352";
+  src = fetchFromGitHub {
+    owner = "jannikmi";
+    repo = pname;
+    rev = version;
+    hash = "sha256-jquaA/+alSRUaa2wXQ6YoDR4EY9OlZCAdcxS5TR0CAU=";
   };
 
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
   propagatedBuildInputs = [
+    h3
     numpy
   ];
 
-  checkInputs = [ numba pytestCheckHook pytest-cov ];
+  checkInputs = [
+    numba
+    pytestCheckHook
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace 'numpy = "^1.22"' 'numpy = "*"'
+  '';
+
+  pythonImportsCheck = [
+    "timezonefinder"
+  ];
+
+  preCheck = ''
+    # Some tests need the CLI on the PATH
+    export PATH=$out/bin:$PATH
+  '';
 
   meta = with lib; {
-    description = "fast python package for finding the timezone of any point on earth (coordinates) offline";
+    description = "Module for finding the timezone of any point on earth (coordinates) offline";
     homepage = "https://github.com/MrMinimal64/timezonefinder";
     license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
   };
 }