From patchwork Thu Apr 27 23:43:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 49618 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 64AD227BBEC; Fri, 28 Apr 2023 00:45:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9773E17ACE for ; Fri, 28 Apr 2023 00:45:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psBHR-0005oQ-Pp; Thu, 27 Apr 2023 19:44:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psBHQ-0005nV-PW for guix-patches@gnu.org; Thu, 27 Apr 2023 19:44:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1psBHQ-00029o-Gz for guix-patches@gnu.org; Thu, 27 Apr 2023 19:44:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psBHQ-0003Os-DU for guix-patches@gnu.org; Thu, 27 Apr 2023 19:44:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63136] [PATCH 05/14] gnu: Add python-timezonefinder. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Apr 2023 23:44:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63136 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63136@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 63136-submit@debbugs.gnu.org id=B63136.168263902212941 (code B ref 63136); Thu, 27 Apr 2023 23:44:04 +0000 Received: (at 63136) by debbugs.gnu.org; 27 Apr 2023 23:43:42 +0000 Received: from localhost ([127.0.0.1]:60038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psBH4-0003Me-9L for submit@debbugs.gnu.org; Thu, 27 Apr 2023 19:43:42 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:53406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psBGm-0003KF-QP for 63136@debbugs.gnu.org; Thu, 27 Apr 2023 19:43:26 -0400 Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-2f86ee42669so8827727f8f.2 for <63136@debbugs.gnu.org>; Thu, 27 Apr 2023 16:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682638999; x=1685230999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Bsjr3Ge6Hyv0kvFB+9AEVPk2vwaqoHY0Rrmqq/bX55o=; b=TDTq+1QRNBrKL9yAUKWXCFB/iryUgXOmWVVzF9LkxmN93aPy+1nbL61yWanCcj951S fmrDyqCgeF2O5z4LSX9Y6f3+T8KfrYYe9s70MSO3pVHr5JQNSU5+MQN3jGv/vxqj728P n64s1zIKRyUGcpbmLMjQ/JKetLNqZR+Qr8JVF1C0pIHLaqmFgiBoPb0enz9OYgW38DpY /E3sU8c2vG71A9v532jHSTgS2oliGEZwaW2qjRFibzcgvwlkLijX6aVkXMRwM6PrigZZ 1QoouTHYyfH7PmWGtuRdKFTPzh05Wyjqxk0ounVepYzvHL5aqK++T5c0WN06qxmqf/BY zPeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682638999; x=1685230999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bsjr3Ge6Hyv0kvFB+9AEVPk2vwaqoHY0Rrmqq/bX55o=; b=Z8Yo9mh3gsTP2vxLXUfuBHKD+oE7tkaZ65IDKkabvhJ+IogEfmX92UQau6rMHyHnoT 4W8/tK7nTJjaf5Rw+nafI26SDdhtD6XBOqjPhhiC0i3GJm3muBdpOyV7Spj8urA7G453 BFH98Zz53x2u/4WK7Uu70ZJMgDRxXP5zQeoTUchLPcWwEsEwsdgvH8VnrUg3kpKaStqy IoqVBMDmAuLJXSexfktaShE2hVAs8F68NoAbTPISyfkEsrZ6fdlOzbUmdCq/GcXkP8wL cZCA5PJECCMMoajQQBiu75OcKcW1K9nl5cBzVihifekbFqZY46Z7dcv+dlSfHEatNHtw dxgA== X-Gm-Message-State: AC+VfDyZzqEAbIn+TnIraK6LCczw2a5gaa/Vw3WDhoyESBJMQ9z2trWh dSLkpNObrms3IFbqqpxwKCGw3ORo9QM= X-Google-Smtp-Source: ACHHUZ5gTsP4bHN8g3y0BH+pSdrQXq1dciog1WbwUuIXrYkrBL0HxBo5VqLy4Yoawuk+GvZRQ8cAkg== X-Received: by 2002:a5d:4651:0:b0:2f7:63f9:6cd3 with SMTP id j17-20020a5d4651000000b002f763f96cd3mr2154392wrs.33.1682638999010; Thu, 27 Apr 2023 16:43:19 -0700 (PDT) Received: from guxtil.incerto.xyz (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id m6-20020a5d6246000000b002feea065cc9sm19555491wrv.111.2023.04.27.16.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 16:43:18 -0700 (PDT) From: Sharlatan Hellseher Date: Fri, 28 Apr 2023 00:43:04 +0100 Message-Id: <20230427234313.19013-5-sharlatanus@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427234313.19013-1-sharlatanus@gmail.com> References: <20230427234313.19013-1-sharlatanus@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2022 Pradana AUMARS +;;; Copyright © 2023 Sharlatan Hellseher ;;; ;;; 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")