From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mOmQM4bbXF80TAAA0tVLHw (envelope-from ) for ; Sat, 12 Sep 2020 14:30:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SB7fLYbbXF/gQgAAB5/wlQ (envelope-from ) for ; Sat, 12 Sep 2020 14:30:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 650BE940221 for ; Sat, 12 Sep 2020 14:30:30 +0000 (UTC) Received: from localhost ([::1]:47320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH6Xt-0003Ek-3m for larch@yhetil.org; Sat, 12 Sep 2020 10:30:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kH6XV-0002qB-1t for guix-patches@gnu.org; Sat, 12 Sep 2020 10:30:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kH6XU-00054s-N0 for guix-patches@gnu.org; Sat, 12 Sep 2020 10:30:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kH6XU-0003tS-Je for guix-patches@gnu.org; Sat, 12 Sep 2020 10:30:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43354] [PATCH 05/55] gnu: python-django-simple-math-captcha: Update to 1.0.9. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Sep 2020 14:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43354 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43354@debbugs.gnu.org Received: via spool by 43354-submit@debbugs.gnu.org id=B43354.159992097514744 (code B ref 43354); Sat, 12 Sep 2020 14:30:04 +0000 Received: (at 43354) by debbugs.gnu.org; 12 Sep 2020 14:29:35 +0000 Received: from localhost ([127.0.0.1]:48593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6X1-0003pf-41 for submit@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6Wy-0003p3-EZ for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36247) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH6Wt-00050w-6I for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:27 -0400 Received: from ti0006q161-3115.bb.online.no ([88.95.106.80]:51826 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kH6Ws-0001rf-DO for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:26 -0400 From: Marius Bakke Date: Sat, 12 Sep 2020 16:28:21 +0200 Message-Id: <20200912142911.6231-5-marius@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200912142911.6231-1-marius@gnu.org> References: <20200912142911.6231-1-marius@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: pm4GjdLTC+98 * gnu/packages/django.scm (python-django-simple-math-captcha): Update to 1.0.9. [source]: Change to GIT-FETCH. [arguments]: Remove #:tests?. Add phases to patch imports and run tests. [native-inputs]: Add PYTHON-MOCK. [propagated-inputs]: Add PYTHON-SIX. --- gnu/packages/django.scm | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 30716dd286..e3e99edd78 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -200,21 +200,37 @@ commands, additional database fields and admin extensions.") (define-public python-django-simple-math-captcha (package (name "python-django-simple-math-captcha") - (version "1.0.7") + (version "1.0.9") + (home-page "https://github.com/alsoicode/django-simple-math-captcha") (source (origin - (method url-fetch) - (uri (pypi-uri "django-simple-math-captcha" version)) + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "0906hms6y6znjhpd0g4wmzv9vcla4brkdpsm4zha9zdj8g5vq2hd")))) + "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw")))) (build-system python-build-system) (arguments - ;; FIXME: Upstream uses a 'runtests.py' script that is not - ;; present in the pypi tarball. - '(#:tests? #f)) + '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-six-imports + (lambda _ + ;; Django no longer bundles six, adjust the imports + ;; accordingly. The six dependency can likely be + ;; removed in the next version. + (substitute* (find-files "." "\\.py$") + (("from django\\.utils import six") + "import six")) + #t)) + (replace 'check + (lambda _ + (invoke "python" "runtests.py")))))) + (native-inputs + `(("python-mock" ,python-mock))) (propagated-inputs - `(("python-django" ,python-django))) - (home-page "https://github.com/alsoicode/django-simple-math-captcha") + `(("python-django" ,python-django) + ("python-six" ,python-six))) (synopsis "Easy-to-use math field/widget captcha for Django forms") (description "A multi-value-field that presents a human answerable question, -- 2.28.0