all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 63136@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#63136] [PATCH 05/14] gnu: Add python-timezonefinder.
Date: Fri, 28 Apr 2023 00:43:04 +0100	[thread overview]
Message-ID: <20230427234313.19013-5-sharlatanus@gmail.com> (raw)
In-Reply-To: <20230427234313.19013-1-sharlatanus@gmail.com>

* gnu/packages/time.scm (python-timezonefinder): New variable.
* gnu/packages/geo.scm (h3-3, python-h3-3): New variables. The latest
compatible versions to build python-timezonefinder.
---
 gnu/packages/geo.scm  | 37 +++++++++++++++++++++++++++++++++++++
 gnu/packages/time.scm | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index a5a2567d83..907eb2cc93 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -251,6 +251,23 @@ (define-public h3
 subdivisions.")
     (license license:asl2.0)))
 
+;; For python-timezonefinder, remove it when it starts supporting newer
+;; version.
+(define-public h3-3
+  (package
+    (inherit h3)
+    (name "h3")
+    (version "3.7.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/uber/h3")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bvsljfxmjvl23v9gxykc4aynjzh5xfy3wg02bxad7cknr1amx9j"))))))
+
 (define-public python-h3
   (package
     (name "python-h3")
@@ -305,6 +322,26 @@ (define-public python-h3
 hierarchical hexagonal geospatial indexing system")
     (license license:asl2.0)))
 
+;; For python-timezonefinder, remove it when it starts supporting newer
+;; version.
+(define-public python-h3-3
+  (package
+    (inherit python-h3)
+    (name "python-h3")
+    (version "3.7.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/uber/h3-py")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "16gxa1sivghxw179rik87r918mjasars2qkzidlwq83qfa4axn20"))))
+    (inputs
+     (modify-inputs (package-inputs python-h3)
+       (replace "h3" h3-3)))))
+
 (define-public memphis
   (package
     (name "memphis")
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index c0bcb848b3..36b561b041 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Ryan Prior <rprior@protonmail.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 Pradana AUMARS <paumars@courrier.dev>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,7 +41,9 @@
 (define-module (gnu packages time)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages geo)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
@@ -50,8 +53,10 @@ (define-module (gnu packages time)
   #:use-module (gnu packages)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix licenses)
   #:use-module (guix packages))
@@ -278,6 +283,38 @@ (define-public python-ciso8601
 Python datetime objects.")
     (license expat)))
 
+(define-public python-timezonefinder
+  (package
+    (name "python-timezonefinder")
+    (version "6.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       ;; The PyPi distribution doesn't include the tests.
+       (uri (git-reference
+             (url "https://github.com/jannikmi/timezonefinder")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0qv9rh6j8c1cqwh4sxrfl1m1ah4aqrf0w2kyrf5cgrpfxi6xr94z"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; TODO: Guix has lower python-pytz than required in the latest
+      ;; version:  pytz.exceptions.UnknownTimeZoneError:
+      ;; 'America/Ciudad_Juarez'
+      ;; It's optional, remove this constrain where python-pytz is updated.
+      #:test-flags #~(list "-k" "not test_with_pytz")))
+    (native-inputs
+     (list python-poetry-core python-pytest))
+    (propagated-inputs
+     (list python-cffi python-h3-3 python-numba python-numpy python-pytz))
+    (home-page "https://timezonefinder.michelfe.it/gui")
+    (synopsis "Finding the timezone of any coordinates on Earth offline")
+    (description "This is a python package for looking up the corresponding
+timezone for given coordinates on earth entirely offline.")
+    (license expat)))
+
 (define-public python-tzlocal
   (package
     (name "python-tzlocal")
-- 
2.39.2





  parent reply	other threads:[~2023-04-28  0:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 23:41 [bug#63136] [PATCH 00/14]: python-astropy: Update to 5.2.2, fix build Sharlatan Hellseher
2023-04-27 23:43 ` [bug#63136] [PATCH 01/14] gnu: python-pytest-doctestplus: Update to 0.12.1 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 02/14] gnu: Add h3 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 03/14] gnu: Sort use-module alphabetically in (gnu packages geo) Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 04/14] gnu: Add python-h3 Sharlatan Hellseher
2023-04-27 23:43   ` Sharlatan Hellseher [this message]
2023-04-27 23:43   ` [bug#63136] [PATCH 06/14] gnu: pytest-filter-subpackage: Update to 0.1.2 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 07/14] gnu: python-pytest-astropy: Simplify package Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 08/14] gnu: python-extension-helpers: Update to 1.0.0 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 09/14] gnu: python-jplephem: Update to 2.18 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 10/14] gnu: python-skyfield: Update to 1.46 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 11/14] gnu: python-pytest-remotedata: Update to 0.4.0 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 12/14] gnu: python-pytest-arraydiff: Update to 0.5.0 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 13/14] gnu: python-pytest-mpl: Update to 0.16.1 Sharlatan Hellseher
2023-04-27 23:43   ` [bug#63136] [PATCH 14/14] gnu: python-astropy: Update to 5.2.2, fix build Sharlatan Hellseher
2023-05-02 14:51 ` [bug#63136] Sharlatan Hellseher
2023-05-08  9:52   ` bug#63136: Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230427234313.19013-5-sharlatanus@gmail.com \
    --to=sharlatanus@gmail.com \
    --cc=63136@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.