From patchwork Tue Mar 14 18:27:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47976 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 C06721698B; Tue, 14 Mar 2023 18:28:48 +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=-2.0 required=5.0 tests=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 96BBF1696C for ; Tue, 14 Mar 2023 18:28:47 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pc9Nb-00011S-4T; Tue, 14 Mar 2023 14:28:11 -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 1pc9NY-0000zK-SH for guix-patches@gnu.org; Tue, 14 Mar 2023 14:28:08 -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 1pc9NU-0002OM-33 for guix-patches@gnu.org; Tue, 14 Mar 2023 14:28:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pc9NT-0008OU-VF for guix-patches@gnu.org; Tue, 14 Mar 2023 14:28:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62191] [PATCH 1/5] gnu: python-debian: Patch using snippet. Drop workaround. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 Mar 2023 18:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62191 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62191@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 62191-submit@debbugs.gnu.org id=B62191.167881844732186 (code B ref 62191); Tue, 14 Mar 2023 18:28:03 +0000 Received: (at 62191) by debbugs.gnu.org; 14 Mar 2023 18:27:27 +0000 Received: from localhost ([127.0.0.1]:38428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pc9Ms-0008N2-Gu for submit@debbugs.gnu.org; Tue, 14 Mar 2023 14:27:26 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:37250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pc9Mm-0008Mg-2Y for 62191@debbugs.gnu.org; Tue, 14 Mar 2023 14:27:20 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 9E99A205A9 for <62191@debbugs.gnu.org>; Tue, 14 Mar 2023 19:27:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 537668009B; Tue, 14 Mar 2023 19:27:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aloJhQXYNYrE; Tue, 14 Mar 2023 19:27:13 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 0A4C180098; Tue, 14 Mar 2023 19:27:12 +0100 (CET) From: Bruno Victal Date: Tue, 14 Mar 2023 18:27:06 +0000 Message-Id: <2886a0ae8e95dc077ebc545e2d7e224f1fe133d4.1678818381.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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/python-xyz.scm (python-debian) [source]: Prefer patching using snippet to modify-phases. [arguments]: Remove, logic was moved into source. [description]: Drop obsolete workaround. --- gnu/packages/python-xyz.scm | 40 ++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 81c9d93c9c..4fe84e1eec 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13642,34 +13642,29 @@ (define-public python-debian (file-name (git-file-name name version)) (sha256 (base32 - "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa")))) + "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; python-apt, apt and dpkg are not yet available in guix, + ;; and these tests heavily depend on them. + (for-each delete-file + '("lib/debian/tests/test_deb822.py" + "lib/debian/tests/test_debfile.py")) + + ;; for reproducible builds, otherwise python-debian + ;; generates a _version.py including the date + (copy-file "lib/debian/_version.py.in" "lib/debian/_version.py") + (substitute* "lib/debian/_version.py" + (("__CHANGELOG_VERSION__") #$version)))))) (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'set-version - ;; for reproducible builds, otherwise python-debian - ;; generates a _version.py including the date - (lambda _ - (copy-file "lib/debian/_version.py.in" "lib/debian/_version.py") - (substitute* "lib/debian/_version.py" - (("__CHANGELOG_VERSION__") ,version)))) - (add-after 'unpack 'remove-debian-specific-tests - ;; python-apt, apt and dpkg are not yet available in guix, - ;; and these tests heavily depend on them. - (lambda _ - (delete-file "lib/debian/tests/test_deb822.py") - (delete-file "lib/debian/tests/test_debfile.py") - #t))))) (propagated-inputs (list python-six python-chardet)) (synopsis "Debian package related modules") (description - ;; XXX: Use @enumerate instead of @itemize to work around - ;; . "This package provides Python modules that abstract many formats of Debian-related files, such as: - -@enumerate +@itemize @item Debtags information; @item @file{debian/changelog} files; @item packages files, pdiffs; @@ -13677,8 +13672,7 @@ (define-public python-debian @file{debian/control}, @file{.changes}, @file{.dsc}; @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to contained files and meta-information. -@end enumerate\n") - +@end itemize") ;; Modules are either GPLv2+ or GPLv3+. (license license:gpl3+)))