From patchwork Tue Sep 5 16:31:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 53481 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 97ED027BBEC; Tue, 5 Sep 2023 17:33:56 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 A4E2227BBE9 for ; Tue, 5 Sep 2023 17:33:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdYzQ-0004Xe-Ez; Tue, 05 Sep 2023 12:33:20 -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 1qdYzN-0004S3-AG for guix-patches@gnu.org; Tue, 05 Sep 2023 12:33:17 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdYzN-0008ES-29 for guix-patches@gnu.org; Tue, 05 Sep 2023 12:33:17 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdYzN-00009j-J1; Tue, 05 Sep 2023 12:33:17 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65758] [PATCH v6 31/55] gnu: python-django-haystack: Update to 3.2.1. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Tue, 05 Sep 2023 16:33:17 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65758 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65758@debbugs.gnu.org Cc: ngraves@ngraves.fr, Lars-Dominik Braun , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by 65758-submit@debbugs.gnu.org id=B65758.169393156132475 (code B ref 65758); Tue, 05 Sep 2023 16:33:17 +0000 Received: (at 65758) by debbugs.gnu.org; 5 Sep 2023 16:32:41 +0000 Received: from localhost ([127.0.0.1]:58394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdYyn-0008Rd-5y for submit@debbugs.gnu.org; Tue, 05 Sep 2023 12:32:41 -0400 Received: from 20.mo581.mail-out.ovh.net ([46.105.49.208]:40137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdYyg-0008QS-WC for 65758@debbugs.gnu.org; Tue, 05 Sep 2023 12:32:36 -0400 Received: from director8.ghost.mail-out.ovh.net (unknown [10.108.20.212]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id 55BB927A4B for <65758@debbugs.gnu.org>; Tue, 5 Sep 2023 16:32:33 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-xq8xp (unknown [10.110.103.49]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 217B61FE2E; Tue, 5 Sep 2023 16:32:33 +0000 (UTC) Received: from ngraves.fr ([37.59.142.106]) by ghost-submission-6684bf9d7b-xq8xp with ESMTPSA id bAQMByFY92T1kQEA/HnBMA (envelope-from ); Tue, 05 Sep 2023 16:32:33 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-106R006e01293d4-8ffa-47b6-9aa1-e5bc8d63d6ae, 9993FFF2090D2781C39498BB7515523824E0E4B2) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.140.142 Date: Tue, 5 Sep 2023 18:31:07 +0200 Message-ID: <4a3e4c2a11df995f95f679ba64313b7905bda7b5.1693931491.git.ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <210284f7682898dae8772280ec23f175e26255a9.1693931491.git.ngraves@ngraves.fr> References: <210284f7682898dae8772280ec23f175e26255a9.1693931491.git.ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6350356952699298530 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudehuddgjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhephffhgeettddugfegiedttedvkeelhefgvdegvdfhffduleevteelleetudefvdelnecuffhomhgrihhnpehhrgihshhtrggtkhhsvggrrhgthhdrohhrghenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddruddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepieehjeehkeesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves 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/django.scm (python-django-haystack): Update to 3.2.1. [build-system]: Use pyproject-build-system. [arguments](phases): Delete phase loosen-version-restrictions. Extend and rename phase set-gdal-lib-path to set-lib-path, add phase check. (tests?): Delete argument. [native-inputs]: Add geos. Delete python-pysolr. --- gnu/packages/django.scm | 60 ++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index fa36b2c5b3..64e4c58f41 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -471,34 +471,63 @@ (define-public python-pytest-django (define-public python-django-haystack (package (name "python-django-haystack") - (version "3.1.1") + (version "3.2.1") (source (origin (method url-fetch) (uri (pypi-uri "django-haystack" version)) (sha256 - (base32 - "10kaa5641cakpra2x3jqgys085gdkjcyns26plfyrmfpjmmpa1bd")))) - (build-system python-build-system) + (base32 "194kf9ps1h8bq8q32x6nniy85grl4l5605vgbd0gw9f2xxx1kqwp")))) + (build-system pyproject-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'loosen-verion-restrictions - (lambda _ - (substitute* "setup.py" - (("geopy.*") "geopy\",\n")))) - (add-before 'check 'set-gdal-lib-path + (add-before 'check 'set-lib-path (lambda* (#:key inputs #:allow-other-keys) - (setenv "GDAL_LIBRARY_PATH" - (string-append (assoc-ref inputs "gdal") - "/lib")))) + (setenv "LD_LIBRARY_PATH" + (string-append + (assoc-ref inputs "gdal") "/lib" + ":" (assoc-ref inputs "geos") "/lib")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (begin + ;; Delete absent elasticsearch tests. + (delete-file-recursively "test_haystack/elasticsearch_tests") + (delete-file-recursively "test_haystack/elasticsearch2_tests") + (delete-file-recursively "test_haystack/elasticsearch5_tests") + (delete-file-recursively "test_haystack/elasticsearch7_tests") + ;; Solr tests require a running solr server. + ;; Deactivating solr. + (delete-file-recursively "test_haystack/solr_tests") + (delete-file "haystack/backends/solr_backend.py") + (delete-file + "haystack/management/commands/build_solr_schema.py") + (delete-file + "test_haystack/test_altered_internal_names.py") + (delete-file "test_haystack/multipleindex/tests.py") + (delete-file "test_haystack/spatial/test_spatial.py") + (substitute* "test_haystack/test_loading.py" + (("class ConnectionHandlerTestCase" all) + (string-append + "\nfrom nose.plugins.attrib import attr" + "\n@attr('skip')" + "\n" all))) + (substitute* "test_haystack/settings.py" + (("\"solr\":") + (string-append + "\"solr\": {\"ENGINE\": \"test_haystack.mocks.MockEngine\"}}" + "\n_={\"solr\":"))) + ;; Run tests. + (invoke "django-admin" + "test" "--settings=test_haystack.settings" + "--pythonpath=."))))) ;; Importing this module requires setting up a Django project. - (delete 'sanity-check)) - #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file + (delete 'sanity-check)))) (propagated-inputs (list python-django)) (native-inputs - (list gdal + (list gdal geos python-coverage python-dateutil python-geopy @@ -506,7 +535,6 @@ (define-public python-django-haystack python-nose python-requests python-setuptools-scm - python-pysolr python-whoosh)) (home-page "https://haystacksearch.org/") (synopsis "Pluggable search for Django")