From patchwork Thu Nov 25 18:14:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Felipe X-Patchwork-Id: 34814 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 455A127BBEA; Thu, 25 Nov 2021 18:15:24 +0000 (GMT) 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_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 B637E27BBE9 for ; Thu, 25 Nov 2021 18:15:23 +0000 (GMT) Received: from localhost ([::1]:34388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqJHG-0002fg-P5 for patchwork@mira.cbaines.net; Thu, 25 Nov 2021 13:15:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqJGw-0002dU-Aq for guix-patches@gnu.org; Thu, 25 Nov 2021 13:15:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqJGw-00007D-1Z for guix-patches@gnu.org; Thu, 25 Nov 2021 13:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mqJGv-0001fF-Oo for guix-patches@gnu.org; Thu, 25 Nov 2021 13:15:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52064] [PATCH] gnu: Add python-sodapy. References: In-Reply-To: Resent-From: Luis Felipe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Nov 2021 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52064 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "52064@debbugs.gnu.org" <52064@debbugs.gnu.org> Received: via spool by 52064-submit@debbugs.gnu.org id=B52064.16378640996374 (code B ref 52064); Thu, 25 Nov 2021 18:15:01 +0000 Received: (at 52064) by debbugs.gnu.org; 25 Nov 2021 18:14:59 +0000 Received: from localhost ([127.0.0.1]:57989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqJGs-0001ej-Op for submit@debbugs.gnu.org; Thu, 25 Nov 2021 13:14:59 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:47097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqJGn-0001eR-Io for 52064@debbugs.gnu.org; Thu, 25 Nov 2021 13:14:57 -0500 Date: Thu, 25 Nov 2021 18:14:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1637864086; bh=FFe3IzdurCUxuc03662y54I5aDR2LcntYmOCl01grG4=; h=Date:To:From:Reply-To:Subject:From; b=fxhNgGkp0IMFk5zGah2hl/hy2ooExq8FYDVrlXmhvJoEKIGUrfHE7tibUqUJ9Ctno oPN5/2TwrzfIKUdGRvBl9tgvXm6yUKcjv5zu6dkJobCqRiYMYWY2iNfvVy5iYzBL4n B8+xUgvImfFNVpndLaqC/hvlTn1CGEnxEy7WYMfE= Message-ID: 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" Reply-to: Luis Felipe X-ACL-Warn: , Luis Felipe via Guix-patches X-Patchwork-Original-From: Luis Felipe via Guix-patches via From: Luis Felipe X-getmail-retrieved-from-mailbox: Patches Hi. Here's the new package definition with check phase enabled. --- Luis Felipe López Acevedo From d7daf5771d02378606437c3b725e1229d405eeaa Mon Sep 17 00:00:00 2001 From: Luis Felipe Date: Tue, 23 Nov 2021 13:30:04 -0500 Subject: [PATCH] gnu: Add python-sodapy. * gnu/packages/python-web.scm (python-sodapy): New variable. --- gnu/packages/python-web.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 4ddf89c207..d82edfa525 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -46,6 +46,7 @@ ;;; Copyright © 2021 Pradana Aumars ;;; Copyright © 2021 Arun Isaac ;;; Copyright © 2021 jgart +;;; Copyright © 2021 Luis Felipe López Acevedo ;;; ;;; This file is part of GNU Guix. ;;; @@ -6348,3 +6349,38 @@ (define-public python-flask-combo-jsonapi Flask-RESTful to quickly build APIs that fit the complexity of existing real-life projects with legacy data and diverse storage providers.") (license license:expat))) + +(define-public python-sodapy + (package + (name "python-sodapy") + (version "2.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xmunoz/sodapy") + (commit (string-append version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "011gmxrnzipa9s6h2m9n9z60l2xb4bnsc983ixylffw8482j3qcx")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + ;; Add current working directory to PYTHONPATH so that + ;; the tests can find the sodapy package. + (setenv "PYTHONPATH" + (string-append (getcwd) ":" + (getenv "PYTHONPATH"))) + (when tests? + (invoke "pytest" "-vv"))))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-requests-mock" ,python-requests-mock))) + (propagated-inputs `(("python-requests" ,python-requests))) + (home-page "https://github.com/xmunoz/sodapy") + (synopsis "Python library for the Socrata Open Data API") + (description "Python library for the Socrata Open Data API.") + (license license:expat))) -- 2.33.0