From patchwork Sat Oct 22 22:20:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 44065 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 A86EB27BBEA; Mon, 24 Oct 2022 07:11:54 +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_INVALID, DKIM_SIGNED,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 6356527BBE9 for ; Mon, 24 Oct 2022 07:11:53 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjs4-0001IJ-Dy for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:55:08 -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 1omMsZ-0004gm-87 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsU-0005N6-UC for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsU-0001yA-PX for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 01/22] gnu: python-setuptools: Move to python-build. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Cc: Lars-Dominik Braun Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664772957419 (code B ref 58587); Sat, 22 Oct 2022 22:22:02 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:21:35 +0000 Received: from localhost ([127.0.0.1]:42523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMs2-0001vZ-Cs for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMry-0001vG-Iy for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMrs-00054G-FJ; Sat, 22 Oct 2022 18:21:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=FB5hIfd0iWFW843+4TFGSvtLo2B9qEI2PkzC+dNMgvA=; b=kNRe6WXfm6bTFTHey/Vw T+sygJHEfYDLCAUUC8dWxz/91bTTgnqhuQ2rHwLvVmyDvMMrxbpHFj2nAF8j5/Cc3ledNpZcmVjr+ plJA8r3gMVE6zd8K+mdShgT771gZhxRk0ip2pK7oP40ROKL4rNKrnxuivRwFQp0riKXE8n7qdxtXb aOWo2S684dlTobWPg8G8RSjImTP5Iqo1E4Zw3b92am7Rl3kwwkml6EDKd8ztrZ3Pc1cHHGPjDSOUM t+TM4L1VwizAGQagCbaI/7ycVD3L0822BLJRb89uT1CkvYtQNp1upEZiX2oRbGvvFsRcdrDK/nI/H uxbqOQX9E+ndBA==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMrW-0001Ky-U4; Sat, 22 Oct 2022 18:21:19 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:39 +0200 Message-Id: <20221022222100.18103-1-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <87eduzu18u.fsf@gnu.org> References: <87eduzu18u.fsf@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches From: Lars-Dominik Braun * gnu/packages/python-xyz.scm (python-setuptools): Move… * gnu/packages/python-build.scm: …here. * gnu/packages/chemistry.scm, gnu/packages/messaging.scm, gnu/packages/sequoia.scm, tests/lint.scm: Adjust module imports accordingly. Co-authored-by: Marius Bakke --- gnu/packages/chemistry.scm | 1 + gnu/packages/messaging.scm | 1 + gnu/packages/python-build.scm | 40 +++++++++++++++++++++++++++++++++++ gnu/packages/python-xyz.scm | 40 ----------------------------------- gnu/packages/sequoia.scm | 2 +- tests/lint.scm | 2 +- 6 files changed, 44 insertions(+), 42 deletions(-) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index d0582c4b6f..6549da3453 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -56,6 +56,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages serialization) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index fa889d24a7..86d9914c90 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -116,6 +116,7 @@ (define-module (gnu packages messaging) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index 9d9b07f769..3ff988820f 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -41,6 +41,46 @@ (define-module (gnu packages python-build) ;;; ;;; Code: +(define-public python-setuptools + (package + (name "python-setuptools") + (version "64.0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "setuptools" version)) + (sha256 + (base32 + "1sllqf0bhsl2yilf1w0xnlz0r4yaksmwaj0ap91zdc6kgbigdjiv")) + (modules '((guix build utils))) + (snippet + ;; Remove included binaries which are used to build self-extracting + ;; installers for Windows. + ;; TODO: Find some way to build them ourself so we can include them. + '(for-each delete-file (find-files "setuptools" + "^(cli|gui).*\\.exe$"))))) + (build-system python-build-system) + ;; FIXME: Tests require pytest, which itself relies on setuptools. + ;; One could bootstrap with an internal untested setuptools. + (arguments (list #:tests? #f)) + (home-page "https://pypi.org/project/setuptools/") + (synopsis "Library designed to facilitate packaging Python projects") + (description "Setuptools is a fully-featured, stable library designed to +facilitate packaging Python projects, where packaging includes: +@itemize +@item Python package and module definitions +@item distribution package metadata +@item test hooks +@item project installation +@item platform-specific details. +@end itemize") + ;; TODO: setuptools now bundles the following libraries: + ;; packaging, pyparsing, six and appdirs. How to unbundle? + (license (list license:psfl ;setuptools itself + license:expat ;six, appdirs, pyparsing + license:asl2.0 ;packaging is dual ASL2/BSD-2 + license:bsd-2)))) + (define-public python-wheel (package (name "python-wheel") diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ebc56bbc11..3ea29ec3b9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2043,46 +2043,6 @@ (define-public python-serpent other machines, such as over the network.") (license license:expat))) -(define-public python-setuptools - (package - (name "python-setuptools") - (version "64.0.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "setuptools" version)) - (sha256 - (base32 - "1sllqf0bhsl2yilf1w0xnlz0r4yaksmwaj0ap91zdc6kgbigdjiv")) - (modules '((guix build utils))) - (snippet - ;; Remove included binaries which are used to build self-extracting - ;; installers for Windows. - ;; TODO: Find some way to build them ourself so we can include them. - '(for-each delete-file (find-files "setuptools" - "^(cli|gui).*\\.exe$"))))) - (build-system python-build-system) - ;; FIXME: Tests require pytest, which itself relies on setuptools. - ;; One could bootstrap with an internal untested setuptools. - (arguments (list #:tests? #f)) - (home-page "https://pypi.org/project/setuptools/") - (synopsis "Library designed to facilitate packaging Python projects") - (description "Setuptools is a fully-featured, stable library designed to -facilitate packaging Python projects, where packaging includes: -@itemize -@item Python package and module definitions -@item distribution package metadata -@item test hooks -@item project installation -@item platform-specific details. -@end itemize") - ;; TODO: setuptools now bundles the following libraries: - ;; packaging, pyparsing, six and appdirs. How to unbundle? - (license (list license:psfl ;setuptools itself - license:expat ;six, appdirs, pyparsing - license:asl2.0 ;packaging is dual ASL2/BSD-2 - license:bsd-2)))) - (define-public python-setuptools-declarative-requirements (package (name "python-setuptools-declarative-requirements") diff --git a/gnu/packages/sequoia.scm b/gnu/packages/sequoia.scm index a8d21ac1a4..7002f684b8 100644 --- a/gnu/packages/sequoia.scm +++ b/gnu/packages/sequoia.scm @@ -36,7 +36,7 @@ (define-module (gnu packages sequoia) #:use-module (gnu packages nettle) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-xyz) ;; python-setuptools + #:use-module (gnu packages python-build) ;python-setuptools #:use-module (gnu packages rust) #:use-module (gnu packages tls)) diff --git a/tests/lint.scm b/tests/lint.scm index 8be74d2604..641486f89b 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -49,7 +49,7 @@ (define-module (test-lint) #:use-module (gnu packages) #:use-module (gnu packages glib) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages python-xyz) + #:use-module (gnu packages python-build) #:use-module ((gnu packages bash) #:select (bash bash-minimal)) #:use-module (web uri) #:use-module (web server) From patchwork Sat Oct 22 22:20:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43828 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 1D11E27BBEA; Mon, 24 Oct 2022 01:24:17 +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_INVALID, DKIM_SIGNED,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 7F0C127BBE9 for ; Mon, 24 Oct 2022 01:24:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjsA-0001Ke-Ej for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:55:14 -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 1omMsZ-0004gl-7n for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsV-0005N8-U2 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsV-0001yQ-Nq for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 02/22] gnu: pypy: Move to separate module. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Cc: Lars-Dominik Braun Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773097502 (code B ref 58587); Sat, 22 Oct 2022 22:22:03 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:21:49 +0000 Received: from localhost ([127.0.0.1]:42541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsF-0001wk-Qq for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMs3-0001vN-EB for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMrx-00055Y-Qv; Sat, 22 Oct 2022 18:21:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=IAXFTLdI1nDiv7sk1T3Id64Vj6NU2663aGsOdelfs34=; b=Umfmr5KUtTCptCfztQF5 04c7grQ2so8ScHx50rVqjitrlmnzoPp0jjbMCQHDAGzv55UaXAROSmeUB89EfLt6KCzdjPIfccwHP 8e710C+VL7aQ1hKGkBQltRVnIO09d4nYY1DIAO/+liwc80pUDDnrWscTiW5e/u5PBoxyFXCW/hZv0 UHZ92jhSHSsUulr1z/PgFucwZLRq0yC1kh5rWHK2GmOXLIdZchtYNPOn+N6/wpyZhmGNei+DcXWZF jRD5elxZlJZ6l+lv2nPBFdFVHNbfa/MOJ9CNsEmZjTybcZYv5JS9+iyb6SxGpWlwr/3tbK+7GDNaW nD7yklm6qed3Zw==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMrt-0001Pq-VH; Sat, 22 Oct 2022 18:21:29 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:40 +0200 Message-Id: <20221022222100.18103-2-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches From: Lars-Dominik Braun This removes the need to import (gnu packages python-xyz) in (gnu packages python), avoiding issues with circular imports. * gnu/packages/python.scm (pypy): Move… * gnu/packages/pypy.scm (pypy): …here * gnu/local.mk: Register new file. Co-authored-by: Marius Bakke --- gnu/local.mk | 1 + gnu/packages/pypy.scm | 273 ++++++++++++++++++++++++++++++++++++++++ gnu/packages/python.scm | 170 ------------------------- 3 files changed, 274 insertions(+), 170 deletions(-) create mode 100644 gnu/packages/pypy.scm diff --git a/gnu/local.mk b/gnu/local.mk index 8247180bef..bf598cec8b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -506,6 +506,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/pure.scm \ %D%/packages/purescript.scm \ %D%/packages/pv.scm \ + %D%/packages/pypy.scm \ %D%/packages/python.scm \ %D%/packages/python-build.scm \ %D%/packages/python-check.scm \ diff --git a/gnu/packages/pypy.scm b/gnu/packages/pypy.scm new file mode 100644 index 0000000000..002cfd59cd --- /dev/null +++ b/gnu/packages/pypy.scm @@ -0,0 +1,273 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Nikita Karetnikov +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2021 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge +;;; Copyright © 2014, 2015 Mark H Weaver +;;; Copyright © 2014, 2017, 2019 Eric Bavier +;;; Copyright © 2014, 2015 Federico Beffa +;;; Copyright © 2015 Omar Radwan +;;; Copyright © 2015 Pierre-Antoine Rault +;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus +;;; Copyright © 2015, 2016 Christine Lemmer-Webber +;;; Copyright © 2015 Eric Dvorsak +;;; Copyright © 2015, 2016 David Thompson +;;; Copyright © 2015, 2016, 2017, 2021 Leo Famulari +;;; Copyright © 2015, 2017 Ben Woodcroft +;;; Copyright © 2015, 2016 Erik Edrosa +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner +;;; Copyright © 2015, 2017 Kyle Meyer +;;; Copyright © 2015, 2016 Chris Marusich +;;; Copyright © 2016 Danny Milosavljevic +;;; Copyright © 2016 Lukas Gradl +;;; Copyright © 2016, 2018 Hartmut Goebel +;;; Copyright © 2016 Daniel Pimentel +;;; Copyright © 2016 Sou Bunnbu +;;; Copyright © 2016, 2017 Troy Sankey +;;; Copyright © 2016, 2017 Nikita +;;; Copyright © 2016 Dylan Jeffers +;;; Copyright © 2016 David Craven +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke +;;; Copyright © 2016, 2017 Stefan Reichör +;;; Copyright © 2016 Dylan Jeffers +;;; Copyright © 2016, 2017 Alex Vong +;;; Copyright © 2016, 2017, 2018 Arun Isaac +;;; Copyright © 2016–2018, 2021 Tobias Geerinckx-Rice +;;; Copyright © 2016, 2017, 2018, 2021 Julien Lepiller +;;; Copyright © 2016, 2017 Thomas Danckaert +;;; Copyright © 2017 Carlo Zancanaro +;;; Copyright © 2017 Frederick M. Muriithi +;;; Copyright © 2017, 2018 Adriano Peluso +;;; Copyright © 2017 Ben Sturmfels +;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe +;;; Copyright © 2017 José Miguel Sánchez García +;;; Copyright © 2017 Roel Janssen +;;; Copyright © 2017, 2018 Kei Kebreau +;;; Copyright © 2017 Rutger Helling +;;; Copyright © 2017 Muriithi Frederick Muriuki +;;; Copyright © 2017 Brendan Tildesley +;;; Copyright © 2018 Ethan R. Jones +;;; Copyright © 2018 Vijayalakshmi Vedantham +;;; Copyright © 2018 Mathieu Lirzin +;;; Copyright © 2018 Adam Massmann +;;; Copyright © 2016, 2018 Tomáš Čech +;;; Copyright © 2018 Nicolas Goaziou +;;; Copyright © 2018 Oleg Pykhalov +;;; Copyright © 2018 Clément Lassieur +;;; Copyright © 2018, 2019, 2020, 2021 Maxim Cournoyer +;;; Copyright © 2018 Luther Thompson +;;; Copyright © 2018 Vagrant Cascadian +;;; Copyright © 2019 Tanguy Le Carrour +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2021 Greg Hogan +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages pypy) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages certs) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages dbm) + #:use-module (gnu packages hurd) + #:use-module (gnu packages libffi) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages readline) + #:use-module (gnu packages shells) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages tcl) + #:use-module (gnu packages tls) + #:use-module (gnu packages xml) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26)) + +(define-public pypy + (package + (name "pypy") + (version "7.3.5") + (source (origin + (method url-fetch) + (uri (string-append "https://downloads.python.org/pypy/" + "pypy3.7-v" version "-src.tar.bz2")) + (sha256 + (base32 + "18lrdmpcczlbk3cfarkgwqdmilrybz56i1dafk8dkjlyk90gw86r")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ;FIXME: 43 out of 364 tests are failing + #:modules '((ice-9 ftw) (ice-9 match) + (guix build utils) (guix build gnu-build-system)) + #:disallowed-references (list nss-certs) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch-source + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("rpython/rlib/clibffi.py") + ;; find_library does not work for libc + (("ctypes\\.util\\.find_library\\('c'\\)") "'libc.so'")) + (substitute* '("lib_pypy/cffi/_pycparser/ply/cpp.py") + ;; Make reproducible (XXX: unused?) + (("time\\.localtime\\(\\)") "time.gmtime(0)")) + (substitute* '("pypy/module/sys/version.py") + ;; Make reproducible + (("t\\.gmtime\\(\\)") "t.gmtime(0)")) + (substitute* '("lib_pypy/_tkinter/tklib_build.py") + ;; Link to versioned libtcl and libtk + (("linklibs = \\['tcl', 'tk'\\]") + "linklibs = ['tcl8.6', 'tk8.6']") + (("incdirs = \\[\\]") + (string-append + "incdirs = ['" + #$(this-package-input "tcl") "/include', '" + #$(this-package-input "tk") "/include']"))) + (substitute* '("lib_pypy/_curses_build.py") + ;; Find curses + (("/usr/local") + #$(this-package-input "ncurses"))) + (substitute* '("lib_pypy/_dbm.py") + ;; Use gdbm compat library, so we don’t need to pull + ;; in bdb. + (("ctypes.util.find_library\\('db'\\)") + (format #f "~s" (search-input-file + inputs "lib/libgdbm_compat.so")))) + (substitute* '("lib_pypy/_sqlite3_build.py") + ;; Always use search paths + (("sys\\.platform\\.startswith\\('freebsd'\\)") "True") + ;; Find sqlite3 + (("/usr/local") (assoc-ref inputs "sqlite")) + (("libname = 'sqlite3'") + (format #f "libname = ~s" + (search-input-file inputs "lib/libsqlite3.so.0")))) + (substitute* '("lib-python/3/subprocess.py") + ;; Fix shell path + (("/bin/sh") + (search-input-file inputs "/bin/sh"))) + (substitute* '("lib-python/3/distutils/unixccompiler.py") + ;; gcc-toolchain does not provide symlink cc -> gcc + (("\"cc\"") "\"gcc\"")))) + (add-after 'unpack 'set-source-file-times-to-1980 + ;; copied from python package, required by zip testcase + (lambda _ + (let ((circa-1980 (* 10 366 24 60 60))) + (ftw "." (lambda (file stat flag) + (utime file circa-1980 circa-1980) + #t))))) + (replace 'build + (lambda _ + (with-directory-excursion "pypy/goal" + ;; Build with jit optimization. + (invoke "python2" + "../../rpython/bin/rpython" + (string-append "--make-jobs=" + (number->string (parallel-job-count))) + "-Ojit" + "targetpypystandalone" + "--allworkingmodules")) + ;; Build c modules and package everything, so tests work. + (with-directory-excursion "pypy/tool/release" + (invoke "python2" "package.py" + "--archive-name" "pypy-dist" + "--builddir" (getcwd))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + (setenv "HOME" "/tmp") ; test_with_pip tries to + ; access ~/.cache/pip + ;; Run library tests only (no interpreter unit tests). + ;; This is what Gentoo does. + (invoke "python" "pypy/test_all.py" + "--pypy=pypy/tool/release/pypy-dist/bin/pypy3" + "lib-python")) + (format #t "test suite not run~%")))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((bin-pypy3 (string-append #$output "/bin/pypy3")) + (shebang-match-python "#!.+/bin/python") + (shebang-pypy3 (string-append "#!" bin-pypy3)) + (dist-dir "pypy/tool/release/pypy-dist")) + (with-directory-excursion dist-dir + ;; Delete test data. + (for-each + (lambda (x) + (delete-file-recursively (string-append + "lib-python/3/" x))) + '("tkinter/test" + "test" + "sqlite3/test" + "lib2to3/tests" + "idlelib/idle_test" + "distutils/tests" + "ctypes/test" + "unittest/test")) + ;; Patch shebang referencing python. + (substitute* '("lib-python/3/cgi.py" + "lib-python/3/encodings/rot_13.py") + ((shebang-match-python) shebang-pypy3)) + (with-fluids ((%default-port-encoding "ISO-8859-1")) + (substitute* '("lib_pypy/_md5.py" + "lib_pypy/_sha1.py") + ((shebang-match-python) shebang-pypy3)))) + (copy-recursively dist-dir #$output))))))) + (native-inputs + (list gzip + nss-certs ; For ssl tests + pkg-config + python-2 + python2-pycparser + tar)) ; Required for package.py + (inputs + (list bzip2 + expat + gdbm + glibc + libffi + ncurses + openssl + sqlite + tcl + tk + xz + zlib)) + (home-page "https://www.pypy.org/") + (synopsis "Python implementation with just-in-time compilation") + (description "PyPy is a faster, alternative implementation of the Python +programming language employing a just-in-time compiler. It supports most +Python code natively, including C extensions.") + (license (list license:expat ; pypy itself; _pytest/ + license:psfl ; python standard library in lib-python/ + license:asl2.0 ; dotviewer/font/ and some of lib-python/ + license:gpl3+ ; ./rpython/rlib/rvmprof/src/shared/libbacktrace/dwarf2.* + license:bsd-3 ; lib_pypy/cffi/_pycparser/ply/ + (license:non-copyleft + "http://www.unicode.org/copyright.html"))))) + +(define-public pypy3 + (deprecated-package "pypy3" pypy)) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index e31158dfc0..00c3eb7774 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -81,17 +81,13 @@ (define-module (gnu packages python) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bash) - #:use-module (gnu packages certs) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages dbm) #:use-module (gnu packages hurd) #:use-module (gnu packages libffi) - #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) - #:use-module (gnu packages shells) #:use-module (gnu packages sqlite) #:use-module (gnu packages tcl) #:use-module (gnu packages tls) @@ -736,169 +732,3 @@ (define-public micropython compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.") (license license:expat))) - -(define-public pypy - (package - (name "pypy") - (version "7.3.5") - (source (origin - (method url-fetch) - (uri (string-append "https://downloads.python.org/pypy/" - "pypy3.7-v" version "-src.tar.bz2")) - (sha256 - (base32 - "18lrdmpcczlbk3cfarkgwqdmilrybz56i1dafk8dkjlyk90gw86r")))) - (build-system gnu-build-system) - (arguments - (list - #:tests? #f ;FIXME: 43 out of 364 tests are failing - #:modules '((ice-9 ftw) (ice-9 match) - (guix build utils) (guix build gnu-build-system)) - #:disallowed-references (list nss-certs) - #:phases - #~(modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'patch-source - (lambda* (#:key inputs #:allow-other-keys) - (substitute* '("rpython/rlib/clibffi.py") - ;; find_library does not work for libc - (("ctypes\\.util\\.find_library\\('c'\\)") "'libc.so'")) - (substitute* '("lib_pypy/cffi/_pycparser/ply/cpp.py") - ;; Make reproducible (XXX: unused?) - (("time\\.localtime\\(\\)") "time.gmtime(0)")) - (substitute* '("pypy/module/sys/version.py") - ;; Make reproducible - (("t\\.gmtime\\(\\)") "t.gmtime(0)")) - (substitute* '("lib_pypy/_tkinter/tklib_build.py") - ;; Link to versioned libtcl and libtk - (("linklibs = \\['tcl', 'tk'\\]") - "linklibs = ['tcl8.6', 'tk8.6']") - (("incdirs = \\[\\]") - (string-append - "incdirs = ['" - #$(this-package-input "tcl") "/include', '" - #$(this-package-input "tk") "/include']"))) - (substitute* '("lib_pypy/_curses_build.py") - ;; Find curses - (("/usr/local") - #$(this-package-input "ncurses"))) - (substitute* '("lib_pypy/_dbm.py") - ;; Use gdbm compat library, so we don’t need to pull - ;; in bdb. - (("ctypes.util.find_library\\('db'\\)") - (format #f "~s" (search-input-file - inputs "lib/libgdbm_compat.so")))) - (substitute* '("lib_pypy/_sqlite3_build.py") - ;; Always use search paths - (("sys\\.platform\\.startswith\\('freebsd'\\)") "True") - ;; Find sqlite3 - (("/usr/local") (assoc-ref inputs "sqlite")) - (("libname = 'sqlite3'") - (format #f "libname = ~s" - (search-input-file inputs "lib/libsqlite3.so.0")))) - (substitute* '("lib-python/3/subprocess.py") - ;; Fix shell path - (("/bin/sh") - (search-input-file inputs "/bin/sh"))) - (substitute* '("lib-python/3/distutils/unixccompiler.py") - ;; gcc-toolchain does not provide symlink cc -> gcc - (("\"cc\"") "\"gcc\"")))) - (add-after 'unpack 'set-source-file-times-to-1980 - ;; copied from python package, required by zip testcase - (lambda _ - (let ((circa-1980 (* 10 366 24 60 60))) - (ftw "." (lambda (file stat flag) - (utime file circa-1980 circa-1980) - #t))))) - (replace 'build - (lambda _ - (with-directory-excursion "pypy/goal" - ;; Build with jit optimization. - (invoke "python2" - "../../rpython/bin/rpython" - (string-append "--make-jobs=" - (number->string (parallel-job-count))) - "-Ojit" - "targetpypystandalone" - "--allworkingmodules")) - ;; Build c modules and package everything, so tests work. - (with-directory-excursion "pypy/tool/release" - (invoke "python2" "package.py" - "--archive-name" "pypy-dist" - "--builddir" (getcwd))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (begin - (setenv "HOME" "/tmp") ; test_with_pip tries to - ; access ~/.cache/pip - ;; Run library tests only (no interpreter unit tests). - ;; This is what Gentoo does. - (invoke "python" "pypy/test_all.py" - "--pypy=pypy/tool/release/pypy-dist/bin/pypy3" - "lib-python")) - (format #t "test suite not run~%")))) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((bin-pypy3 (string-append #$output "/bin/pypy3")) - (shebang-match-python "#!.+/bin/python") - (shebang-pypy3 (string-append "#!" bin-pypy3)) - (dist-dir "pypy/tool/release/pypy-dist")) - (with-directory-excursion dist-dir - ;; Delete test data. - (for-each - (lambda (x) - (delete-file-recursively (string-append - "lib-python/3/" x))) - '("tkinter/test" - "test" - "sqlite3/test" - "lib2to3/tests" - "idlelib/idle_test" - "distutils/tests" - "ctypes/test" - "unittest/test")) - ;; Patch shebang referencing python. - (substitute* '("lib-python/3/cgi.py" - "lib-python/3/encodings/rot_13.py") - ((shebang-match-python) shebang-pypy3)) - (with-fluids ((%default-port-encoding "ISO-8859-1")) - (substitute* '("lib_pypy/_md5.py" - "lib_pypy/_sha1.py") - ((shebang-match-python) shebang-pypy3)))) - (copy-recursively dist-dir #$output))))))) - (native-inputs - (list gzip - nss-certs ; For ssl tests - pkg-config - python-2 - python2-pycparser - tar)) ; Required for package.py - (inputs - (list bzip2 - expat - gdbm - glibc - libffi - ncurses - openssl - sqlite - tcl - tk - xz - zlib)) - (home-page "https://www.pypy.org/") - (synopsis "Python implementation with just-in-time compilation") - (description "PyPy is a faster, alternative implementation of the Python -programming language employing a just-in-time compiler. It supports most -Python code natively, including C extensions.") - (license (list license:expat ; pypy itself; _pytest/ - license:psfl ; python standard library in lib-python/ - license:asl2.0 ; dotviewer/font/ and some of lib-python/ - license:gpl3+ ; ./rpython/rlib/rvmprof/src/shared/libbacktrace/dwarf2.* - license:bsd-3 ; lib_pypy/cffi/_pycparser/ply/ - (license:non-copyleft - "http://www.unicode.org/copyright.html"))))) - -(define-public pypy3 - (deprecated-package "pypy3" pypy)) From patchwork Sat Oct 22 22:20:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 44043 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 EB38A27BBEA; Mon, 24 Oct 2022 06:32:15 +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_INVALID, DKIM_SIGNED,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 5B03827BBE9 for ; Mon, 24 Oct 2022 06:32:15 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjsX-0001Q1-RI for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:55:37 -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 1omMsZ-0004go-Bv for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsV-0005N7-EM for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsV-0001yH-6f for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 03/22] gnu: python-pip: Move to (gnu packages python-build). Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773007461 (code B ref 58587); Sat, 22 Oct 2022 22:22:03 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:21:40 +0000 Received: from localhost ([127.0.0.1]:42535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMs7-0001w4-SO for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMs4-0001vP-MF for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMrz-00055f-Gg for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=K4MJRIUhkpDFagll/aR/A9WakT+wr9pPRiSQzD38fkk=; b=cbS4DXdIvtAlBfVyH9Co lOs1uO4vwtmUL3RwVV3MV5dIy6pMqe/YNZ1detJYYvCVTUW8es67Yp983UpuIrvRCqMZlSB5VPm77 lW+Ola8YFQP4kXySLdr2FLTTWx7rRjDdhJXDzLtdCTLBQbBQ+JIwm5s2UP2d6X7ocDlizH6hokkPb lwAwSdfTbPDrpoTqCWCnH5EBVi3auaue/UmRj22eTpSohNeDpyUcYLT6OUd4dPqNxofXlin3cZomS gpW8muRdeboyma3CQy7hSVXi7xDqck43WZSBUOsJACgywBRuEt5Fo3G326UK5paysHbxOLB48/VXj qRBSh4HtHBMlbg==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMry-0001R6-TK for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:31 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:41 +0200 Message-Id: <20221022222100.18103-3-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-pip): Move from here ... * gnu/packages/python-build.scm (python-pip): ... to here. --- gnu/packages/python-build.scm | 21 +++++++++++++++++++++ gnu/packages/python-xyz.scm | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index 3ff988820f..c8f57ea286 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -41,6 +41,27 @@ (define-module (gnu packages python-build) ;;; ;;; Code: +(define-public python-pip + (package + (name "python-pip") + (version "22.2.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pip" version)) + (sha256 + (base32 + "0jwac0bhfp48w4fqibf1ysrs2grksdv92hwqm7bmdw2jn2fr5l9z")))) + (build-system python-build-system) + (arguments + '(#:tests? #f)) ; there are no tests in the pypi archive. + (home-page "https://pip.pypa.io/") + (synopsis "Package manager for Python software") + (description + "Pip is a package manager for Python software, that finds packages on the +Python Package Index (PyPI).") + (license license:expat))) + (define-public python-setuptools (package (name "python-setuptools") diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 3ea29ec3b9..1ded6f0384 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12650,27 +12650,6 @@ (define-public python-pretend responses, rather than doing any computation.") (license license:bsd-3))) -(define-public python-pip - (package - (name "python-pip") - (version "22.2.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pip" version)) - (sha256 - (base32 - "0jwac0bhfp48w4fqibf1ysrs2grksdv92hwqm7bmdw2jn2fr5l9z")))) - (build-system python-build-system) - (arguments - '(#:tests? #f)) ; there are no tests in the pypi archive. - (home-page "https://pip.pypa.io/") - (synopsis "Package manager for Python software") - (description - "Pip is a package manager for Python software, that finds packages on the -Python Package Index (PyPI).") - (license license:expat))) - ;;; Variant used to break a dependency cycle with ;;; python-pytest-perf-bootstrap. (define-public python-pip-run-bootstrap From patchwork Sat Oct 22 22:20:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43881 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 E2C7927BBEA; Mon, 24 Oct 2022 03:29: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 DD0B927BBE9 for ; Mon, 24 Oct 2022 03:29:53 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjrw-0001Dd-9U for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:55:00 -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 1omMsZ-0004gj-3s for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsW-0005NA-FE for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsW-0001yk-98 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 04/22] build-system: Add pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Cc: Lars-Dominik Braun Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773127519 (code B ref 58587); Sat, 22 Oct 2022 22:22:04 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:21:52 +0000 Received: from localhost ([127.0.0.1]:42545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsH-0001wv-K0 for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMs6-0001vX-4Y for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMs0-00055r-UR; Sat, 22 Oct 2022 18:21:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=eWQPcmJocZl3NMY92nG3C0gNYXSfQIsEJAlkGooTdpU=; b=L2PxTcMZDaDYETQKZwkY HJ0FJleVnkOqHV07O49z9ydOBiKZG1SDGTGeETH73ote7PlxKMWeKkxZL1NsB265yisTY7JExN4R8 zbLaT0xk0Iu+VRVeuBz4bj6cHlsu4KLtlJhrfyY0/zb5xZpS/9xf3G3Su5jXg0V1qYWJRXpNiAeBR y+1DklsIw3iVA2Olm6FuSO64bwP34VbbfLLAH6+bloOrs4JjO0Earbs6H51qoffK4SSr3M09v3KKb UgoDltSBHIC2K22lP2Smh4oUSyEUk3z6Lwm6isvRDum2sslb5dlvxozqCAYogZiPoscvo2RPe+iH4 ZGdKktoqD3NNtA==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMs0-0001RB-DO; Sat, 22 Oct 2022 18:21:32 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:42 +0200 Message-Id: <20221022222100.18103-4-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches From: Lars-Dominik Braun This is an experimental build system based on python-build-system that implements PEP 517-compliant builds. * doc/guix.texi (Build Systems): Add pyproject-build-system section. * doc/contributing.texi (Python Modules): Mention pyproject.toml and the PYTHON-TOOLCHAIN package, as well as differences to python-build-system. * guix/build-system/pyproject.scm, guix/build/pyproject-build-system.scm, gnu/packages/aux-files/python/sanity-check-next.py, gnu/packages/python-commencement.scm: New files. * Makefile.am (MODULES): Register the new build systems. * gnu/local.mk (GNU_SYSTEM_MODULES): Add python-commencement.scm. * gnu/packages/python.scm (python-sans-pip, python-sans-pip-wrapper): New variables. Co-authored-by: Marius Bakke --- Makefile.am | 2 + doc/contributing.texi | 36 +- doc/guix.texi | 29 ++ .../aux-files/python/sanity-check-next.py | 98 +++++ gnu/packages/python.scm | 52 ++- guix/build-system/pyproject.scm | 147 +++++++ guix/build/pyproject-build-system.scm | 367 ++++++++++++++++++ 7 files changed, 722 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/aux-files/python/sanity-check-next.py create mode 100644 guix/build-system/pyproject.scm create mode 100644 guix/build/pyproject-build-system.scm diff --git a/Makefile.am b/Makefile.am index 22dcc43f99..6ccb790c11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -166,6 +166,7 @@ MODULES = \ guix/build-system/maven.scm \ guix/build-system/node.scm \ guix/build-system/perl.scm \ + guix/build-system/pyproject.scm \ guix/build-system/python.scm \ guix/build-system/renpy.scm \ guix/build-system/ocaml.scm \ @@ -222,6 +223,7 @@ MODULES = \ guix/build/minetest-build-system.scm \ guix/build/node-build-system.scm \ guix/build/perl-build-system.scm \ + guix/build/pyproject-build-system.scm \ guix/build/python-build-system.scm \ guix/build/ocaml-build-system.scm \ guix/build/qt-build-system.scm \ diff --git a/doc/contributing.texi b/doc/contributing.texi index 4b1eed1cb1..c3221d23e4 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -786,12 +786,29 @@ for instance, the module python-dateutil is packaged under the names starts with @code{py} (e.g.@: @code{pytz}), we keep it and prefix it as described above. +@quotation Note +Currently there are two different build systems for Python packages in Guix: +@var{python-build-system} and @var{pyproject-build-system}. For the +longest time, Python packages were built from an informally specified +@file{setup.py} file. That worked amazingly well, considering Python's +success, but was difficult to build tooling around. As a result, a host +of alternative build systems emerged and the community eventually settled on a +@url{https://peps.python.org/pep-0517/, formal standard} for specifying build +requirements. @var{pyproject-build-system} is Guix's implementation of this +standard. It is considered ``experimental'' in that it does not yet support +all the various PEP-517 @emph{build backends}, but you are encouraged to try +it for new Python packages and report any problems. It will eventually be +deprecated and merged into @var{python-build-system}. +@end quotation + @subsubsection Specifying Dependencies @cindex inputs, for Python packages Dependency information for Python packages is usually available in the package source tree, with varying degrees of accuracy: in the -@file{setup.py} file, in @file{requirements.txt}, or in @file{tox.ini}. +@file{pyproject.toml} file, the @file{setup.py} file, in +@file{requirements.txt}, or in @file{tox.ini} (the latter mostly for +test dependencies). Your mission, when writing a recipe for a Python package, is to map these dependencies to the appropriate type of ``input'' (@pxref{package @@ -802,10 +819,12 @@ following check list to determine which dependency goes where. @itemize @item -We currently package Python 2 with @code{setuptools} and @code{pip} -installed like Python 3.4 has per default. Thus you don't need to -specify either of these as an input. @command{guix lint} will warn you -if you do. +We currently package Python with @code{setuptools} and @code{pip} +installed per default. This is about to change, and users are encouraged +to use @code{python-toolchain} if they want a build environment for Python. + +@command{guix lint} will warn if @code{setuptools} or @code{pip} are +added as native-inputs because they are generally not necessary. @item Python dependencies required at run time go into @@ -814,9 +833,10 @@ Python dependencies required at run time go into @file{requirements.txt} file. @item -Python packages required only at build time---e.g., those listed with -the @code{setup_requires} keyword in @file{setup.py}---or only for -testing---e.g., those in @code{tests_require}---go into +Python packages required only at build time---e.g., those listed under +@code{build-system.requires} in @file{pyproject.toml} or with the +@code{setup_requires} keyword in @file{setup.py}---or dependencies only +for testing---e.g., those in @code{tests_require} or @file{tox.ini}---go into @code{native-inputs}. The rationale is that (1) they do not need to be propagated because they are not needed at run time, and (2) in a cross-compilation context, it's the ``native'' input that we'd want. diff --git a/doc/guix.texi b/doc/guix.texi index f0fb383005..621f9923b4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9311,7 +9311,36 @@ instead of the default @code{"out"} output. This is useful for packages that include a Python package as only a part of the software, and thus want to combine the phases of @code{python-build-system} with another build system. Python bindings are a common usecase. +@end defvr + +@defvr {Scheme Variable} pyproject-build-system +This is a variable exported by @code{guix build-system pyproject}. It +is based on of @var{python-build-system}, and adds support for +@file{pyproject.toml} and @url{https://peps.python.org/pep-0517/, PEP 517}. +It also supports a variety of build backends and test frameworks. + +The API is slightly different from @var{python-build-system}: +@enumerate +@item +@code{#:use-setuptools?} and @code{#:test-target} is removed. +@item +@code{#:build-backend} is added. It defaults to @code{#false} and will try +to guess the appropriate backend based on @file{pyproject.toml}. +@item +@code{#:test-backend} is added. It defaults to @code{#false} and will guess +an appropriate test backend based on what is available in package inputs. +@item +@code{#:test-flags} is added. The default is @code{#false}, and varies based +on the detected @code{#:test-backend}. +@end enumerate + +It is considered ``experimental'' in that the implementation details are +not set in stone yet, however users are encouraged to try it for new +Python projects (even those using @file{setup.py}). The API is subject to +change, but any breaking changes in the Guix channel will be dealt with. +Eventually this build system will be deprecated and merged back into +@var{python-build-system}, probably some time in 2024. @end defvr @defvr {Scheme Variable} perl-build-system diff --git a/gnu/packages/aux-files/python/sanity-check-next.py b/gnu/packages/aux-files/python/sanity-check-next.py new file mode 100644 index 0000000000..891606f72b --- /dev/null +++ b/gnu/packages/aux-files/python/sanity-check-next.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- + +# This version adds a small change to accomodate missing python-setuptools. +# Original patch by Lars-Dominik Braun in wip-python-pep517, commit +# 720dbe22d431262938be29dd9a9ddb78c44a99b3. +# --- sanity-check.py 2022-06-12 14:40:06.814337702 +0200 +# +++ sanity-check.py 2022-10-16 23:21:38.990651568 +0200 +# @@ -19,9 +19,13 @@ +# from __future__ import print_function # Python 2 support. +# import importlib +# -import pkg_resources +# import sys +# import traceback +# +try: +# + import pkg_resources +# +except ImportError: +# + print('Warning: Skipping, because python-setuptools are not available.') +# + sys.exit(0) + +# TODO: Merge with sanity-check.py in the next core-updates cycle. + +from __future__ import print_function # Python 2 support. +import importlib +import sys +import traceback +try: + import pkg_resources +except ImportError: + print('Warning: Skipping, because python-setuptools are not available.') + sys.exit(0) + +try: + from importlib.machinery import PathFinder +except ImportError: + PathFinder = None + +ret = 0 + +# Only check site-packages installed by this package, but not dependencies +# (which pkg_resources.working_set would include). Path supplied via argv. +ws = pkg_resources.find_distributions(sys.argv[1]) + +for dist in ws: + print('validating', repr(dist.project_name), dist.location) + try: + print('...checking requirements: ', end='') + req = str(dist.as_requirement()) + # dist.activate() is not enough to actually check requirements, we + # have to .require() it. + pkg_resources.require(req) + print('OK') + except Exception as e: + print('ERROR:', req, repr(e)) + ret = 1 + continue + + # Try to load top level modules. This should not have any side-effects. + try: + metalines = dist.get_metadata_lines('top_level.txt') + except (KeyError, EnvironmentError): + # distutils (i.e. #:use-setuptools? #f) will not install any metadata. + # This file is also missing for packages built using a PEP 517 builder + # such as poetry. + print('WARNING: cannot determine top-level modules') + continue + for name in metalines: + # Only available on Python 3. + if PathFinder and PathFinder.find_spec(name) is None: + # Ignore unavailable modules, often C modules, which were not + # installed at the top-level. Cannot use ModuleNotFoundError, + # because it is raised by failed imports too. + continue + try: + print('...trying to load module', name, end=': ') + importlib.import_module(name) + print('OK') + except Exception: + print('ERROR:') + traceback.print_exc(file=sys.stdout) + ret = 1 + + # Try to load entry points of console scripts too, making sure they + # work. They should be removed if they don't. Other groups may not be + # safe, as they can depend on optional packages. + for group, v in dist.get_entry_map().items(): + if group not in {'console_scripts', 'gui_scripts'}: + continue + for name, ep in v.items(): + try: + print('...trying to load endpoint', group, name, end=': ') + ep.load() + print('OK') + except Exception: + print('ERROR:') + traceback.print_exc(file=sys.stdout) + ret = 1 + +sys.exit(ret) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 00c3eb7774..f55e5a16da 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven -;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke +;;; Copyright © 2016-2022 Marius Bakke ;;; Copyright © 2016, 2017 Stefan Reichör ;;; Copyright © 2016, 2017 Alex Vong ;;; Copyright © 2016, 2017, 2018 Arun Isaac @@ -60,6 +60,7 @@ ;;; Copyright © 2020, 2021 Greg Hogan ;;; Copyright © 2022 Philip McGrath ;;; Copyright © 2022 jgart +;;; Copyright © 2021 Lars-Dominik Braun ;;; ;;; This file is part of GNU Guix. ;;; @@ -87,6 +88,7 @@ (define-module (gnu packages python) #:use-module (gnu packages hurd) #:use-module (gnu packages libffi) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python-build) #:use-module (gnu packages readline) #:use-module (gnu packages sqlite) #:use-module (gnu packages tcl) @@ -674,6 +676,54 @@ (define* (wrap-python3 python (define-public python-wrapper (wrap-python3 python)) (define-public python-minimal-wrapper (wrap-python3 python-minimal)) +;; The Python used in pyproject-build-system. +(define-public python-sans-pip + (hidden-package + (package/inherit python + (arguments + (substitute-keyword-arguments (package-arguments python) + ((#:configure-flags flags #~()) + #~(append '("--with-ensurepip=no") + (delete "--with-ensurepip=install" #$flags)))))))) + +(define-public python-sans-pip-wrapper + (wrap-python3 python-sans-pip)) + +(define-public python-toolchain + (package + (name "python-toolchain") + (version (package-version python)) + (source #f) + (build-system trivial-build-system) + (arguments + (list #:modules '((guix build union)) + #:builder + #~(begin + (use-modules (ice-9 match) + (srfi srfi-1) + (guix build union)) + (union-build #$output + (filter-map (match-lambda + ((_ . directory) directory)) + %build-inputs))))) + (inputs + (list python-sans-pip-wrapper + python-pip + python-pypa-build + python-setuptools + python-wheel)) + (native-search-paths + (package-native-search-paths python)) + (search-paths + (package-search-paths python)) + (license (package-license python)) + (synopsis "Python toolchain") + (description + "Python toolchain including Python itself, setuptools and pip. Use this +package if you need a minimal Python toolchain instead of just the +interpreter.") + (home-page (package-home-page python)))) + (define-public micropython (package (name "micropython") diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.scm new file mode 100644 index 0000000000..1e365d4f21 --- /dev/null +++ b/guix/build-system/pyproject.scm @@ -0,0 +1,147 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Lars-Dominik Braun +;;; Copyright © 2022 Marius Bakke +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build-system pyproject) + #:use-module ((gnu packages) #:select (search-auxiliary-file)) + #:use-module (guix gexp) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (guix memoization) + #:use-module (guix gexp) + #:use-module (guix monads) + #:use-module (guix packages) + #:use-module (guix derivations) + #:use-module (guix search-paths) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (guix build-system python) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (%pyproject-build-system-modules + default-python + pyproject-build + pyproject-build-system)) + +;; Commentary: +;; +;; Standard build procedure for Python packages using 'pyproject.toml'. +;; This is implemented as an extension of 'python-build-system'. +;; +;; Code: + +(define %pyproject-build-system-modules + ;; Build-side modules imported by default. + `((guix build pyproject-build-system) + (guix build json) + ,@%python-build-system-modules)) + +(define (default-python) + "Return the default Python package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((python (resolve-interface '(gnu packages python)))) + (module-ref python 'python-toolchain))) + +(define sanity-check.py + ;; TODO: Merge with sanity-check.py in the next rebuild cycle. + (search-auxiliary-file "python/sanity-check-next.py")) + +(define* (lower name + #:key source inputs native-inputs outputs system target + (python (default-python)) + #:allow-other-keys + #:rest arguments) + "Return a bag for NAME." + (define private-keywords + '(#:target #:python #:inputs #:native-inputs)) + + (and (not target) ;XXX: no cross-compilation + (bag + (name name) + (system system) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs + + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(standard-packages))) + (build-inputs `(("python" ,python) + ("sanity-check.py" ,(local-file sanity-check.py)) + ,@native-inputs)) + (outputs (append outputs '(wheel))) + (build pyproject-build) + (arguments (strip-keyword-arguments private-keywords arguments))))) + +(define* (pyproject-build name inputs + #:key source + (tests? #t) + (configure-flags ''()) + (build-backend #f) + (test-backend #f) + (test-flags #f) + (phases '%standard-phases) + (outputs '("out" "wheel")) + (search-paths '()) + (system (%current-system)) + (guile #f) + (imported-modules %pyproject-build-system-modules) + (modules '((guix build pyproject-build-system) + (guix build utils)))) + "Build SOURCE using PYTHON, and with INPUTS." + (define build + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + + #$(with-build-variables inputs outputs + #~(pyproject-build + #:name #$name + #:source #+source + #:configure-flags #$configure-flags + #:system #$system + #:build-backend #$build-backend + #:test-backend #$test-backend + #:test-flags #$test-flags + #:tests? #$tests? + #:phases #$(if (pair? phases) + (sexp->gexp phases) + phases) + #:outputs %outputs + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:inputs %build-inputs))))) + + + (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) + system #:graft? #f))) + (gexp->derivation name build + #:system system + #:graft? #f ;consistent with 'gnu-build' + #:target #f + #:guile-for-build guile))) + +(define pyproject-build-system + (build-system + (name 'pyproject) + (description "The PEP517-compliant Python build system") + (lower lower))) + +;;; pyproject.scm ends here diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-build-system.scm new file mode 100644 index 0000000000..16a6db9537 --- /dev/null +++ b/guix/build/pyproject-build-system.scm @@ -0,0 +1,367 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Lars-Dominik Braun +;;; Copyright © 2022 Marius Bakke +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build pyproject-build-system) + #:use-module ((guix build python-build-system) #:prefix python:) + #:use-module (guix build utils) + #:use-module (guix build json) + #:use-module (ice-9 match) + #:use-module (ice-9 ftw) + #:use-module (ice-9 format) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) + #:export (%standard-phases + add-installed-pythonpath + site-packages + python-version + pyproject-build)) + +;;; Commentary: +;;; +;;; PEP 517-compatible build system for Python packages. +;;; +;;; PEP 517 mandates the use of a TOML file called pyproject.toml at the +;;; project root, describing build and runtime dependencies, as well as the +;;; build system, which can be different from setuptools. This module uses +;;; that file to extract the build system used and call its wheel-building +;;; entry point build_wheel (see 'build). setuptools’ wheel builder is +;;; used as a fallback if either no pyproject.toml exists or it does not +;;; declare a build-system. It supports config_settings through the +;;; standard #:configure-flags argument. +;;; +;;; This wheel, which is just a ZIP file with a file structure defined +;;; by PEP 427 (https://www.python.org/dev/peps/pep-0427/), is then unpacked +;;; and its contents are moved to the appropriate locations in 'install. +;;; +;;; Then entry points, as defined by the PyPa Entry Point Specification +;;; (https://packaging.python.org/specifications/entry-points/) are read +;;; from a file called entry_points.txt in the package’s site-packages +;;; subdirectory and scripts are written to bin/. These are not part of a +;;; wheel and expected to be created by the installing utility. +;;; TODO: Add support for PEP-621 entry points. +;;; +;;; Caveats: +;;; - There is no support for in-tree build backends. +;;; +;;; Code: +;;; + +;; Re-export these variables from python-build-system as many packages +;; rely on these. +(define python-version python:python-version) +(define site-packages python:site-packages) +(define add-installed-pythonpath python:add-installed-pythonpath) + +;; Base error type. +(define-condition-type &python-build-error &error + python-build-error?) + +;; Raised when 'check cannot find a valid test system in the inputs. +(define-condition-type &test-system-not-found &python-build-error + test-system-not-found?) + +;; Raised when multiple wheels are created by 'build. +(define-condition-type &cannot-extract-multiple-wheels &python-build-error + cannot-extract-multiple-wheels?) + +;; Raised, when no wheel has been built by the build system. +(define-condition-type &no-wheels-built &python-build-error + no-wheels-built?) + +(define* (build #:key outputs build-backend configure-flags #:allow-other-keys) + "Build a given Python package." + + (define (pyproject.toml->build-backend file) + "Look up the build backend in a pyproject.toml file." + (call-with-input-file file + (lambda (in) + (let loop ((line (read-line in 'concat))) + (if (eof-object? line) + #f + (let ((m (string-match "build-backend = [\"'](.+)[\"']" line))) + (if m (match:substring m 1) + (loop (read-line in 'concat))))))))) + + (let* ((wheel-output (assoc-ref outputs "wheel")) + (wheel-dir (if wheel-output wheel-output "dist")) + ;; There is no easy way to get data from Guile into Python via + ;; s-expressions, but we have JSON serialization already, which Python + ;; also supports out-of-the-box. + (config-settings (call-with-output-string (cut write-json configure-flags <>))) + ;; python-setuptools’ default backend supports setup.py *and* + ;; pyproject.toml. Allow overriding this automatic detection via + ;; build-backend. + (auto-build-backend (if (file-exists? "pyproject.toml") + (pyproject.toml->build-backend "pyproject.toml") + #f)) + ;; Use build system detection here and not in importer, because a) we + ;; have alot of legacy packages and b) the importer cannot update arbitrary + ;; fields in case a package switches its build system. + (use-build-backend (or + build-backend + auto-build-backend + "setuptools.build_meta"))) + (format #t "Using '~a' to build wheels, auto-detected '~a', override '~a'.~%" + use-build-backend auto-build-backend build-backend) + (mkdir-p wheel-dir) + ;; Call the PEP 517 build function, which drops a .whl into wheel-dir. + (invoke "python" "-c" "import sys, importlib, json +config_settings = json.loads (sys.argv[3]) +builder = importlib.import_module(sys.argv[1]) +builder.build_wheel(sys.argv[2], config_settings=config_settings)" + use-build-backend wheel-dir config-settings))) + +(define* (check #:key inputs outputs tests? test-backend test-flags #:allow-other-keys) + "Run the test suite of a given Python package." + (if tests? + ;; Unfortunately with PEP 517 there is no common method to specify test + ;; systems. Guess test system based on inputs instead. + (let* ((pytest (which "pytest")) + (nosetests (which "nosetests")) + (nose2 (which "nose2")) + (have-setup-py (file-exists? "setup.py")) + (use-test-backend + (or + test-backend + ;; Prefer pytest + (if pytest 'pytest #f) + (if nosetests 'nose #f) + (if nose2 'nose2 #f) + ;; But fall back to setup.py, which should work for most + ;; packages. XXX: would be nice not to depend on setup.py here? fails + ;; more often than not to find any tests at all. Maybe we can run + ;; `python -m unittest`? + (if have-setup-py 'setup.py #f)))) + (format #t "Using ~a~%" use-test-backend) + (match use-test-backend + ('pytest + (apply invoke (cons pytest (or test-flags '("-vv"))))) + ('nose + (apply invoke (cons nosetests (or test-flags '("-v"))))) + ('nose2 + (apply invoke (cons nose2 (or test-flags '("-v" "--pretty-assert"))))) + ('setup.py + (apply invoke (append '("python" "setup.py") (or test-flags '("test" "-v"))))) + ;; The developer should explicitly disable tests in this case. + (else (raise (condition (&test-system-not-found)))))) + (format #t "test suite not run~%"))) + +(define* (install #:key inputs outputs (configure-flags '()) #:allow-other-keys) + "Install a wheel file according to PEP 427" + ;; See https://www.python.org/dev/peps/pep-0427/#installing-a-wheel-distribution-1-0-py32-none-any-whl + (let* ((site-dir (site-packages inputs outputs)) + (python (assoc-ref inputs "python")) + (out (assoc-ref outputs "out"))) + (define (extract file) + "Extract wheel (ZIP file) into site-packages directory" + ;; Use Python’s zipfile to avoid extra dependency + (invoke "python" "-m" "zipfile" "-e" file site-dir)) + + (define python-hashbang + (string-append "#!" python "/bin/python")) + + (define* (merge-directories source destination #:optional (post-move #f)) + "Move all files in SOURCE into DESTINATION, merging the two directories." + (format #t "Merging directory ~a into ~a~%" source destination) + (for-each + (lambda (file) + (format #t "~a/~a -> ~a/~a~%" source file destination file) + (mkdir-p destination) + (rename-file + (string-append source "/" file) + (string-append destination "/" file)) + (when post-move + (post-move file))) + (scandir source (negate (cut member <> '("." ".."))))) + (rmdir source)) + + (define (expand-data-directory directory) + "Move files from all .data subdirectories to their respective +destinations." + ;; Python’s distutils.command.install defines this mapping from source to + ;; destination mapping. + (let ((source (string-append directory "/scripts")) + (destination (string-append out "/bin"))) + (when (file-exists? source) + (merge-directories + source + destination + (lambda (f) + (let ((dest-path (string-append destination "/" f))) + (chmod dest-path #o755) + (substitute* dest-path (("#!python") python-hashbang))))))) + ;; data can create arbitrary directory structures. Most commonly + ;; it is used for share/. + (let ((source (string-append directory "/data")) + (destination out)) + (when (file-exists? source) + (merge-directories source destination))) + (let* ((distribution (car (string-split (basename directory) #\-))) + (source (string-append directory "/headers")) + (destination (string-append out "/include/python" (python-version python) "/" distribution))) + (when (file-exists? source) + (merge-directories source destination)))) + + (define (list-directories base predicate) + ;; Cannot use find-files here, because it’s recursive. + (scandir + base + (lambda (name) + (let ((stat (lstat (string-append base "/" name)))) + (and + (not (member name '("." ".."))) + (eq? (stat:type stat) 'directory) + (predicate name stat)))))) + + (let* ((wheel-output (assoc-ref outputs "wheel")) + (wheel-dir (if wheel-output wheel-output "dist")) + (wheels (map (cut string-append wheel-dir "/" <>) + (scandir wheel-dir (cut string-suffix? ".whl" <>))))) + (cond + ((> (length wheels) 1) ; This code does not support multiple wheels + ; yet, because their outputs would have to be + ; merged properly. + (raise (condition (&cannot-extract-multiple-wheels)))) + ((= (length wheels) 0) + (raise (condition (&no-wheels-built))))) + (for-each extract wheels)) + (let ((datadirs (map + (cut string-append site-dir "/" <>) + (list-directories site-dir (file-name-predicate "\\.data$"))))) + (for-each (lambda (directory) + (expand-data-directory directory) + (rmdir directory)) + datadirs)))) + +(define* (compile-bytecode #:key inputs outputs (configure-flags '()) #:allow-other-keys) + "Compile installed byte-code in site-packages." + (let* ((site-dir (site-packages inputs outputs)) + (python (assoc-ref inputs "python")) + (major-minor (map string->number + (take (string-split (python-version python) #\.) 2))) + (<3.7? (match major-minor + ((major minor) + (or (< major 3) (and (= major 3) (< minor 7))))))) + (if <3.7? + ;; These versions don’t have the hash invalidation modes and do + ;; not produce reproducible bytecode files. + (format #t "Skipping bytecode compilation for Python version ~a < 3.7~%" + (python-version python)) + (invoke "python" "-m" "compileall" "--invalidation-mode=unchecked-hash" + site-dir)))) + +(define* (create-entrypoints #:key inputs outputs (configure-flags '()) #:allow-other-keys) + "Implement Entry Points Specification +(https://packaging.python.org/specifications/entry-points/) by PyPa, +which creates runnable scripts in bin/ from entry point specification +file entry_points.txt. This is necessary, because wheels do not contain +these binaries and installers are expected to create them." + + (define (entry-points.txt->entry-points file) + "Specialized parser for Python configfile-like files, in particular +entry_points.txt. Returns a list of console_script and gui_scripts +entry points." + (call-with-input-file file + (lambda (in) + (let loop ((line (read-line in)) + (inside #f) + (result '())) + (if (eof-object? line) + result + (let* ((group-match (string-match "^\\[(.+)\\]$" line)) + (group-name (if group-match (match:substring group-match 1) #f)) + (next-inside + (if (not group-name) + inside + (or + (string=? group-name "console_scripts") + (string=? group-name "gui_scripts")))) + (item-match (string-match "^([^ =]+)\\s*=\\s*([^:]+):(.+)$" line))) + (if (and inside item-match) + (loop (read-line in) next-inside (cons (list + (match:substring item-match 1) + (match:substring item-match 2) + (match:substring item-match 3)) + result)) + (loop (read-line in) next-inside result)))))))) + + (define (create-script path name module function) + "Create a Python script from an entry point’s NAME, MODULE and + FUNCTION and return write it to PATH/NAME." + (let ((interpreter (which "python")) + (file-path (string-append path "/" name))) + (format #t "Creating entry point for '~a.~a' at '~a'.~%" module function + file-path) + (call-with-output-file file-path + (lambda (port) + ;; Technically the script could also include search-paths, + ;; but having a generic 'wrap phases also handles manually + ;; written entry point scripts. + (format port "#!~a +# Auto-generated entry point script. +import sys +import ~a as mod +sys.exit (mod.~a ())~%" interpreter module function))) + (chmod file-path #o755))) + + (let* ((site-dir (site-packages inputs outputs)) + (out (assoc-ref outputs "out")) + (bin-dir (string-append out "/bin")) + (entry-point-files (find-files site-dir "^entry_points.txt$"))) + (mkdir-p bin-dir) + (for-each + (lambda (f) + (for-each + (lambda (ep) (apply create-script (cons bin-dir ep))) + (entry-points.txt->entry-points f))) + entry-point-files))) + +(define* (set-SOURCE-DATE-EPOCH #:rest _) + "Set the 'SOURCE_DATE_EPOCH' environment variable. This is used by tools +that incorporate timestamps as a way to tell them to use a fixed timestamp. +See https://reproducible-builds.org/specs/source-date-epoch/." + ;; Use a post-1980 timestamp because the Zip format used in wheels do + ;; not support timestamps before 1980. + (setenv "SOURCE_DATE_EPOCH" "315619200")) + +(define %standard-phases + ;; The build phase only builds C extensions and copies the Python sources, + ;; while the install phase copies then byte-compiles the sources to the + ;; prefix directory. The check phase is moved after the installation phase + ;; to ease testing the built package. + (modify-phases python:%standard-phases + (replace 'set-SOURCE-DATE-EPOCH set-SOURCE-DATE-EPOCH) + (replace 'build build) + (replace 'install install) + (delete 'check) + ;; Must be before tests, so they can use installed packages’ entry points. + (add-before 'wrap 'create-entrypoints create-entrypoints) + (add-after 'wrap 'check check) + (add-before 'check 'compile-bytecode compile-bytecode))) + +(define* (pyproject-build #:key inputs (phases %standard-phases) + #:allow-other-keys #:rest args) + "Build the given Python package, applying all of PHASES in order." + (apply python:python-build #:inputs inputs #:phases phases args)) + +;;; pyproject-build-system.scm ends here From patchwork Sat Oct 22 22:20:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 44045 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 DE3A127BBEA; Mon, 24 Oct 2022 06:38:25 +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_INVALID, DKIM_SIGNED,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 406A827BBE9 for ; Mon, 24 Oct 2022 06:38:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjso-0001XV-0u for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:55:54 -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 1omMsZ-0004gq-5p for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsX-0005P2-2a for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsW-0001z0-TM for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 05/22] news: Add entry for 'pyproject-build-system'. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773127527 (code B ref 58587); Sat, 22 Oct 2022 22:22:04 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:21:52 +0000 Received: from localhost ([127.0.0.1]:42549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsK-0001xE-1X for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMs7-0001vb-P1 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMs2-000568-Ih for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=67GeqkP3hGjHSt5+tzXANr2lznv7u8X8n4ipIOh1pZ4=; b=qNvlvmtv0fZIYpIXDF3k Mj64plz6sWImsgz1MbeRGEW5vfqC2VZwRLJbVBtrQE5xERrHyYUVXqi7whnG25gio227e7cXCSBR/ By81r7W10C4XSQ//VHOhaDvSzTcAvXoMQofFABxpEdo7PMyUBNMQF0XBQpL1JAt9TkLWSTUQ3NEnX RZPcGKa6sHaRIEyPv1ONucV/8JTiz/uvSsGQ0k93oIErGhr4zToeGFG3uYsfAfx+kCYGIALRbuRx+ 2RwSQ8zZ2jA9BPczUyOKAuLe+powViw983MZlGzTvd3ipJDK8NvU2za6BLvivP93wFCz//IUkKwLJ uTMe8mxq/PLz+g==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMs2-0001RH-3H for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:34 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:43 +0200 Message-Id: <20221022222100.18103-5-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * etc/news.scm: Add entry. --- etc/news.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/etc/news.scm b/etc/news.scm index d9ffa036a2..c2ac842947 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -6,7 +6,7 @@ ;; Copyright © 2019, 2020 Konrad Hinsen ;; Copyright © 2019, 2020, 2021 Julien Lepiller ;; Copyright © 2019–2022 Florian Pelz -;; Copyright © 2020 Marius Bakke +;; Copyright © 2020, 2022 Marius Bakke ;; Copyright © 2020, 2021 Mathieu Othacehe ;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;; Copyright © 2020, 2021, 2022 Maxim Cournoyer @@ -26,6 +26,26 @@ (channel-news (version 0) + (entry (commit "3f82a8b2d075f5980ffa8cdd9c49a5a8586e5b1b") + (title + (en "New build system for Python packages")) + (body + (en "A new @var{pyproject-build-system} has been added. This +is a redesign of @var{python-build-system} with support for @dfn{PEP 517} +and @file{pyproject.toml} files. It also has built-in support for various +test frameworks such as @command{pytest} and @code{nosetests}. + +There is a complementary @code{python-toolchain} package that comes with +updated versions of @command{pip}, @command{setuptools} and others. + +The build system will eventually be merged into @var{python-build-system} +but you are encouraged to use it for packages in the @code{guix} channel. +Third party channels may want to wait until the API is stable (see the +Guix manual for caveats). + +Despite the name, @var{pyproject-build-system} also works with the +``legacy'' @file{setup.py} format."))) + (entry (commit "c7ba5f38b80433b040d3946b8fc0b1e8621ba30a") (title (en "New @option{--emulate-fhs} option for @command{guix shell}") From patchwork Sat Oct 22 22:20:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43830 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 D35FB27BBEA; Mon, 24 Oct 2022 01:34:15 +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_INVALID, DKIM_SIGNED,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 4E70B27BBE9 for ; Mon, 24 Oct 2022 01:34:15 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjrb-00019r-Cf for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:54:39 -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 1omMsZ-0004gk-3y for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsX-0005Tx-W1 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsX-0001zM-Ra for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 07/22] gnu: flair: Switch to pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773237598 (code B ref 58587); Sat, 22 Oct 2022 22:22:05 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:03 +0000 Received: from localhost ([127.0.0.1]:42558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsV-0001yN-CX for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsF-0001wR-Lt for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsA-00056Z-Gf for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=GJEyjFVjDOSDLaNg7FYY8NKuh0hVe3tcRl8rQQG5NtQ=; b=KNTlgVbHs8SBdQSi6pKf 7Yl3Fk9jNCkmlKsYYDFbUJ1cq45qnQu/mSan3bixiwc7peBj2QYJyGRtrswG7oM+VTPd/B/yy678s vyUCzQKXyK4u9VWrZfP2vthbv3bFdOonyxaiEULtg+vkjZp5kZ0JLnybb5LNBEEJnoeqmoAMo4k+B 8madAez0jShH+XjRxTyW4EoZfzINRNi9yPkQcyXWfrg2aFcg/Zz5ZpyebizMPNOPoWPFWOHGcMsYd Fis2aauytana7xrsFMNZMQ2OWEYj15fYQqoewGI1l2qSmeADJwR2XTL0BE/OOus0mUzlZ624Zihra FvIRDuxczHXyJw==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsA-0001RR-2g for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:42 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:45 +0200 Message-Id: <20221022222100.18103-7-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bioinformatics.scm (flair)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove #:phases. [native-inputs]: Remove. --- gnu/packages/bioinformatics.scm | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index f2de09aa32..3588f4e3fd 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -56,6 +56,7 @@ (define-module (gnu packages bioinformatics) #:use-module (guix build-system meson) #:use-module (guix build-system ocaml) #:use-module (guix build-system perl) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system qt) #:use-module (guix build-system r) @@ -16928,33 +16929,15 @@ (define-public flair (sha256 (base32 "106swb2q7l20ki58fca1hg95q5f79bgp9gjb0clr2243ycrzyxf8")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - (list - #:tests? #false ;there are none - #:phases - #~(modify-phases %standard-phases - ;; TODO: implement as a feature of python-build-system (PEP-621, - ;; PEP-631, PEP-660) - (replace 'build - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version) - ;; ZIP does not support timestamps before 1980. - (setenv "SOURCE_DATE_EPOCH" "315532800") - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (apply invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output - (find-files "dist" "\\.whl$"))))))) + (list #:tests? #false)) ;there are none (propagated-inputs (list python-mappy python-ncls python-pybedtools python-pysam python-tqdm)) - (native-inputs - (list python-pypa-build python-setuptools)) (home-page "https://flair.readthedocs.io/en/latest/") (synopsis "Full-length alternative isoform analysis of RNA") (description "This package implements FLAIR (Full-Length Alternative From patchwork Sat Oct 22 22:20:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 44090 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 5723427BBEA; Mon, 24 Oct 2022 07:58:13 +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_INVALID, DKIM_SIGNED,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 A1A4827BBE9 for ; Mon, 24 Oct 2022 07:58:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjrh-0001BE-F6 for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:54:45 -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 1omMsZ-0004gn-4b for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsY-0005U0-BC for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsY-0001zT-6h for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 08/22] gnu: python-pydyf: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773247608 (code B ref 58587); Sat, 22 Oct 2022 22:22:06 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:04 +0000 Received: from localhost ([127.0.0.1]:42561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsV-0001yV-QX for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsH-0001wY-8g for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsC-00056f-2k for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=kflm8QbXlO5a2zk+j3MCbpwjiqHbJv2OCcaL4iwNSK4=; b=qrzqQrsXC/m+8XKSdfx0 H1bLxVmwHVVWQesbzLGZWEXzEcwbpw9Phoy8KngJu6nlPzIqRkv0CapWl7MlooapHv5CbcRRYT/FO Qg/liCHqatbg1tcxcp5drkRmMIOpXi1zdDjKU5Bwiwmn99m5C/0l/3rtk278i05CzaMuhbtUBtBzB PxDaXrhIT7+FeQqwmGJPGm5TXsJEFCOVsVHvyLXEtioC5Rf1Jx+yUuZGnZUaCb+v2fRRdjXO9YbTI ndpARqg81zw3p7hvtn9z4kqt5KauIQ1pOfW9viswQngsLrRIvyQJ7i6EouA31g01pFSNOt4Z/01Qe JfFRwhSgneMEbg==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsB-0001RW-J0 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:43 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:46 +0200 Message-Id: <20221022222100.18103-8-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/pdf.scm (python-pydyf)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove #:phases. Add #:test-flags. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/pdf.scm | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index b49e5264f9..ec75bca6e3 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -49,6 +49,7 @@ (define-module (gnu packages pdf) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module (guix build-system meson) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system qt) #:use-module (guix build-system trivial) @@ -735,28 +736,14 @@ (define-public python-pydyf (uri (pypi-uri "pydyf" version)) (sha256 (base32 "18q43g5d9455msipcgd5fvnh8m4a2rz189slzfg80yycjw66rshs")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "-c" "/dev/null"))))))) + #:test-flags #~'("-vv" "-c" "/dev/null"))) (propagated-inputs (list python-pillow)) (native-inputs (list ghostscript python-flit-core - python-pypa-build python-pytest)) (home-page "https://github.com/CourtBouillon/pydyf") (synopsis "Low-level PDF generator") From patchwork Sat Oct 22 22:20:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43938 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 5326D27BBEA; Mon, 24 Oct 2022 04:11:35 +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_INVALID, DKIM_SIGNED,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 E08FD27BBE9 for ; Mon, 24 Oct 2022 04:11:34 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjrV-00018m-Er for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:54:33 -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 1omMsZ-0004gs-6O for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsY-0005U3-MG for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsY-0001za-Hw for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 09/22] gnu: weasyprint: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773247624 (code B ref 58587); Sat, 22 Oct 2022 22:22:06 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:04 +0000 Received: from localhost ([127.0.0.1]:42564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsW-0001yf-51 for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsI-0001wb-OK for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsD-00056j-Iy for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=3+eQtppnn3nXQOdDQCihD9B0PsifcuOoUb/12XbGaTA=; b=bZbjnCAwjFSjGRfq39oR 2hlXMmP9cFyz6Qa2I08wikW0OTn74oeD7vFxE+Yl2q8i4MIb/6XiBmGd3S+macL5ELal7iTEFEzwp x7b7hvuiotUubqY9Hy+HTT9a+Si78bhIcQHYIMtNufXcr83YnwX+B63whjoTgIUTeXp7EHiIPz/GW Ce73zz3eDtQYONwFp/whDoz42IYmciiTVraeGzTvaOIRMngNFSRZVuyp/pdMX6YOvvkE149OWvMMg bkFtoFEDyp+wPzDdlak8iz6zeB8UpxYCq0vaXcMOkiwqMRLOdYFRfJS1QyW8cxF67Q5MuXBqpjEvb DTG9ws3xyW+Nzg==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsD-0001Rb-51 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:45 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:47 +0200 Message-Id: <20221022222100.18103-9-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/pdf.scm (weasyprint)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove redundant phases. Add #:test-flags. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/pdf.scm | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index ec75bca6e3..8c871e4341 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -1497,9 +1497,11 @@ (define-public weasyprint (sha256 (base32 "0cn8gpgyic6pmrnhp0540nbgplpsd5aybi7k89anz6m1sshgjzgs")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list + #:test-flags #~(list "-vv" "-c" "/dev/null" + "-n" (number->string (parallel-job-count))) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-library-paths @@ -1520,21 +1522,7 @@ (define-public weasyprint (("'pangoft2-1.0-0'") (format #f "~s" (search-input-file inputs - "lib/libpangoft2-1.0.so")))))) - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "-c" "/dev/null" - "-n" (number->string (parallel-job-count)))))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) + "lib/libpangoft2-1.0.so"))))))))) (inputs (list fontconfig glib harfbuzz pango)) (propagated-inputs (list gdk-pixbuf @@ -1552,7 +1540,6 @@ (define-public weasyprint (list font-dejavu ;tests depend on it ghostscript python-flit-core - python-pypa-build python-pytest python-pytest-xdist)) (home-page "https://weasyprint.org/") From patchwork Sat Oct 22 22:20:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43962 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 BC0F527BBEA; Mon, 24 Oct 2022 04:43:24 +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_INVALID, DKIM_SIGNED,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 722EE27BBE9 for ; Mon, 24 Oct 2022 04:43:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjsg-0001UF-Dp for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:55:46 -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 1omMsZ-0004h6-Cc for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -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 1omMsZ-0005Uq-4j for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMsY-0001zi-Vv for guix-patches@gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 10/22] gnu: python-glyphslib: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:22:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773257637 (code B ref 58587); Sat, 22 Oct 2022 22:22:06 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:05 +0000 Received: from localhost ([127.0.0.1]:42567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsW-0001yv-Om for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsK-0001wi-82 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsF-00056r-2v for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Q/AZitL3qkCOLqYFzL787h9HNn6LxS2iyRJOEc4RO9U=; b=kdIx4k+MAmAnkjeBGwhu gkWAPLOafDGhQ78jTwVDIdYpgMPWNjAj9euB6MyjIZr5GsJv+lyoxQDAsbr7uBUgk9b1ajfcNa4WU ccxwIVF4vfhN0n07aeT5zXVbMTap7SKenaWaeINWf+KnTaTOUSF0GJqSH6zBB/W8sjk7+ncTRklhl 0IwMY7g9Ol+EexGKoR+tZ1YkolxitzLX2J0V+FKDE4K/sguZGGULm1qkGZZdg/tiZHFjbb1LRyOdT eqJZanBipg++E4lNZEc8BJ3z+VITmVOlhs0zrXVbC/w+4YY6Xo4pBtHzmqdTzm5gGhF5YPKyI5pXL xPjw0O8Rhbr2QA==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsE-0001Rg-LT for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:46 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:48 +0200 Message-Id: <20221022222100.18103-10-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fontutils.scm (python-glyphslib)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Add #:test-flags. Remove #:phases. [native-inputs]: Remove PYTHON-PYPA-BUILD and PYTHON-WHEEL. --- gnu/packages/fontutils.scm | 42 ++++++++++---------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 9b7f1ac879..eefde1d893 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -76,8 +76,9 @@ (define-module (gnu packages fontutils) #:use-module (guix build-system copy) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) - #:use-module (guix build-system python) #:use-module (guix build-system meson) + #:use-module (guix build-system pyproject) + #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (srfi srfi-1)) @@ -591,39 +592,18 @@ (define-public python-glyphslib (sha256 (base32 "0mkkwd09g76hvif603ij5aqicxh47zvhgyyd0pjcjmpdy6dr70yw")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (replace 'build - (lambda _ - ;; The Zip format does not support pre-1980 time stamps. - (let ((circa-1980 (* 10 366 24 60 60))) - (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980)) - (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "GUIX_PYTHONPATH" - (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH"))) - (invoke "pytest" "-vv" - ;; These fail because the test data has not yet been - ;; updated for newer FontTools: - ;; https://github.com/googlefonts/glyphsLib/issues/787 - ;; Re-enable for versions > 6.0.7. - "--ignore=tests/builder/designspace_gen_test.py" - "--ignore=tests/builder/interpolation_test.py" - ))))))) + #:test-flags #~'("-vv" + ;; These fail because the test data has not yet been + ;; updated for newer FontTools: + ;; https://github.com/googlefonts/glyphsLib/issues/787 + ;; Re-enable for versions > 6.0.7. + "--ignore=tests/builder/designspace_gen_test.py" + "--ignore=tests/builder/interpolation_test.py"))) (native-inputs - (list python-pypa-build - python-setuptools-scm - python-wheel + (list python-setuptools-scm ;; For tests. python-pytest From patchwork Sat Oct 22 22:20:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43873 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 73CB327BBEA; Mon, 24 Oct 2022 03:17:55 +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_INVALID, DKIM_SIGNED,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 202F927BBE9 for ; Mon, 24 Oct 2022 03:17:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjtp-0001s7-MD for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:56:57 -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 1omMtV-0004mK-3G for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtU-00061P-SV for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtU-00024X-NA for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 11/22] gnu: python-statmake: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773457794 (code B ref 58587); Sat, 22 Oct 2022 22:23:04 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:25 +0000 Received: from localhost ([127.0.0.1]:42597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsr-00021Y-3a for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMse-0001zr-3D for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsL-0005Mw-5p for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=ceZVkUQjSuYrrM7iupoIDNK7vaP2D8CZPUZV8SYltmA=; b=DbeOCj0ud678a5K5D0Ac aJRtiosuiGBBq72qOZO847q4n680q4RljLrdDlzTcGiIaxSAt26V3BjICQjFqEecx96Sdk+VnCy+G dJcSWB3juyJKeurOkJqIUa1TqlNa1XToB8Cs/6ONr27P349E5uhMqMA+koOAt5bYGnFPcaKWhmAqb rDc1MqFvW602UGvUhQPVKEihge/FC8eFGeKChtrm8V5KCqogOjqrpSPvwv7IxHRymGYJC4jqHMqi3 cJYPEkCAZamk4xx87fD3XR/5l8L/9uxEZyIJV3nT+UykN6s2L+HB2xG/fz00euM5EvH3zQwxu/KoV Q2u7azIh/KwFtg==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsG-0001Rl-7q for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:52 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:49 +0200 Message-Id: <20221022222100.18103-11-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fontutils.scm (python-statmake)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove redundant phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/fontutils.scm | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index eefde1d893..5c95f9a427 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -1561,12 +1561,11 @@ (define-public python-statmake (sha256 (base32 "0qavzspxhwnaayj5mxq6ncjjziggabxj157ls04h2rdrpq167706")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases - ;; XXX: PEP 517 manual build copied from python-isort. (add-after 'unpack 'adjust-for-older-attrs ;; Our older attrs package is using the 'attr' rather than 'attrs' ;; namespace. @@ -1583,27 +1582,9 @@ (define-public python-statmake (("@attrs") "@attr") (("\\battrs\\.") - "attr.")))) - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "tests" - ;;"-n" (number->string (parallel-job-count)) - ;; This test requires orjson, which needs the maturin - ;; build system and new Rust dependencies. - ;;"--ignore" "tests/test_preconf.py" - ))))))) + "attr."))))))) (native-inputs (list python-poetry-core - python-pypa-build python-pytest python-ufo2ft)) (propagated-inputs From patchwork Sat Oct 22 22:20:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43974 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 BC73027BBEB; Mon, 24 Oct 2022 04:58:05 +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_INVALID, DKIM_SIGNED,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 23F4527BBEA for ; Mon, 24 Oct 2022 04:58:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjtY-0001kf-Py for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:56:40 -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 1omMtU-0004mI-94 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtU-000617-2Q for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtT-00024J-Tj for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 13/22] gnu: python-mypy-protobuf: Switch to pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773447780 (code B ref 58587); Sat, 22 Oct 2022 22:23:03 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:24 +0000 Received: from localhost ([127.0.0.1]:42593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsq-00021J-Dr for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMse-0001zq-3A for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsP-0005N1-CU for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=HuZ8V925BtDB25+n1oiSnJCJH1JcbU0kfQfYzGR+guI=; b=OfkSwrXP827JUdLMDCio tb383eS7yRuJuGDe1AoHc4bM3ZWxRvPBqHS6z19WGRyaCkflaMAAEkdcoTAbNBiYXGnix7hR4wzVl J+8t0kRPSsBriNud6fqpPqNZ1qFeMT6I5CAf11+ONAcHqixeqIZBI+voacQiBfvWBAp6OghWLktOI 6NyAaMLHF91vonfF+BHMjlHPHm6PK6jgeHnhfbLsgjNyWi6yFFpSBSh2y7NhfsvwO48Cc94KRjYRY udcZJrtFM3GYhDdCWFTDG1AFxEWpMzZB4XlN45L2/jzGs/wJe9fysk/TjFpJeDFNPXuB9xd47QEiD mL2CQmeLFu7ajA==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsN-0001Rw-Sc for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:57 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:51 +0200 Message-Id: <20221022222100.18103-13-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/protobuf.scm (python-mypy-protobuf)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove redundant phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/protobuf.scm | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm index a61d9d7492..e90e0ad3fa 100644 --- a/gnu/packages/protobuf.scm +++ b/gnu/packages/protobuf.scm @@ -31,6 +31,7 @@ (define-module (gnu packages protobuf) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system emacs) #:use-module (guix build-system ruby) @@ -285,22 +286,11 @@ (define-public python-mypy-protobuf (sha256 (base32 "0z03h9k68qvnlyhpk0ndwp01bdx77vrjr6mybxq4ldilkkbksklk")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - ;; ZIP does not support timestamps before 1980. - (setenv "SOURCE_DATE_EPOCH" "315532800") - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) (add-before 'check 'generate-protos-for-tests (lambda _ ;; Generate Python sources. @@ -324,7 +314,6 @@ (define-public python-mypy-protobuf (native-inputs (list python-grpc-stubs python-grpcio-tools - python-pypa-build python-pytest python-typing-extensions-next)) (propagated-inputs From patchwork Sat Oct 22 22:20:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43859 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 B456327BBEA; Mon, 24 Oct 2022 02:53: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 746C427BBE9 for ; Mon, 24 Oct 2022 02:53:56 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjug-00027v-Ga for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:57:50 -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 1omMtT-0004mF-Rn for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtS-00060n-Mb for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtS-00023v-Hm for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 14/22] gnu: python-tempora: Switch to pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773437758 (code B ref 58587); Sat, 22 Oct 2022 22:23:02 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:23 +0000 Received: from localhost ([127.0.0.1]:42587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsp-000212-EB for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMse-0001zo-1n for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsQ-0005N2-S6 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=kz/i97HvqaiTyvuymkZ2Fixm3hr/OdiR/vl4HJtFCUw=; b=Ksslb68n4kR/Y8fiPa1C Yve5ZTkTDvWsnOjkAlNT5s2dBAsmJprglHo1IwZ5DWypsRsJKu7c1PuziX5VouPKJc6zp8MzRKjvH hX7DBx6LLKwrWQGNvi2iT+3bNwhls9wnAysqZ1tFadB/2Bmoqnvb3DCuTBx320f8ifQtR4OVJ8SpY 5TNxZuiUz33RbKolcgNQUimSTeXSf31h/nVt17klr+BOJDkZRmicRK01uEfObR6A+d7fYAr+zj+l4 gQ3vS9xGa6rKCO190QTFEzDjvx/xynviebJC8p7CAiWJ79fA+ih3hheJaS/MEe5CMYK5gsAvA6SNE v+i95RHV2IF0fw==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsQ-0001TL-EO for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:21:58 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:52 +0200 Message-Id: <20221022222100.18103-14-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-tempora)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Add #:test-flags. Remove #:phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/python-xyz.scm | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 42935cbaaa..f4113ca351 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -21199,30 +21199,13 @@ (define-public python-tempora (uri (pypi-uri "tempora" version)) (sha256 (base32 "09wirlk5vmxlhl9rnxp7g5qz2nsd6b0gnzk5fczbz0s8lsbz386b")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - (list - #:phases - #~(modify-phases %standard-phases - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - (setenv "SOURCE_DATE_EPOCH" "315532800") - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Do not test the myproject.toml build as it tries to pull - ;; dependencies from the Internet. - (invoke "pytest" "-k" "not project"))))))) + ;; Do not test the myproject.toml build as it tries to pull + ;; dependencies from the Internet. + (list #:test-flags #~'("-vv" "-k" "not project"))) (native-inputs - (list python-pypa-build - python-freezegun + (list python-freezegun python-pytest python-pytest-black python-pytest-checkdocs From patchwork Sat Oct 22 22:20:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43868 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 1B98327BBEA; Mon, 24 Oct 2022 03:05:51 +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_INVALID, DKIM_SIGNED,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 8F53B27BBE9 for ; Mon, 24 Oct 2022 03:05:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omju1-0001vs-26 for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:57:09 -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 1omMtT-0004mE-Ph for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtT-00060q-8X for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtT-000244-0k for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 15/22] gnu: python-pygmsh: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773447765 (code B ref 58587); Sat, 22 Oct 2022 22:23:02 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:24 +0000 Received: from localhost ([127.0.0.1]:42589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsp-000215-Pr for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMse-0001zl-11 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsS-0005N3-Fe for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=is+XVJWlcy+CkXHy/QKMEkdG4Lfzm53VoWzYi8rHSIo=; b=Z7ly49Sa5mOZ1Z/QL19M zWQJM4JGekH/3wnrOaR1XL6aFgKHzPVH1pX/meX5k4mMwAxpF+uIuKDqOPB184IMLwk5pfUAa1fof u/9bqPBvzz27ykIgQPHTG6UxhPoPtG3KtZTiOaokDw1xaftRMUgkN1ly6Rh4jEunQv6W01ddsCpKQ ArHUOabcOb8mq7Zn7ar9SccEGFhGQ52Qx8MCyl2QSLa9pgwjMdqZUZyXy/2d+XAMsqevw1O70AfKv lumtbxKZR1Y3xupXfkxf/f6UHw13AjChflsMBwA7hi+TWKSgnlNW/HqyNazmqBjml4oZnzhg/1Q3f ZxaozH98SEcVJw==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsS-0001TP-1O for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:00 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:53 +0200 Message-Id: <20221022222100.18103-15-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/simulation.scm (python-pygmsh)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove redundant phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/simulation.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 39b5620822..57a7882765 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -57,6 +57,7 @@ (define-module (gnu packages simulation) #:use-module (guix svn-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -828,7 +829,7 @@ (define-public python-pygmsh (sha256 (base32 "11flp2c4ynk1fhanf4mqyzrpd0gjbnv6afrwwc7xi3mb6ms69lr0")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases @@ -838,21 +839,8 @@ (define-public python-pygmsh ;; Due to lack of metadata, the gmsh Python package is not ;; detected although importable. (substitute* "pyproject.toml" - (("\"gmsh\",") "")))) - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-v" "tests")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) - (native-inputs (list python-pypa-build python-flit-core python-pytest)) + (("\"gmsh\",") ""))))))) + (native-inputs (list python-flit-core python-pytest)) (propagated-inputs (list gmsh python-meshio python-numpy)) (home-page "https://github.com/nschloe/pygmsh") (synopsis "Python frontend for Gmsh") From patchwork Sat Oct 22 22:20:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43872 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 D669D27BBEA; Mon, 24 Oct 2022 03:17:31 +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_INVALID, DKIM_SIGNED,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 2130C27BBE9 for ; Mon, 24 Oct 2022 03:17:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjuW-00024y-21 for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:57:40 -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 1omMtV-0004mL-F5 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtV-00061T-84 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtV-00024f-3Y for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 17/22] gnu: python-openapi-schema-validator: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773707862 (code B ref 58587); Sat, 22 Oct 2022 22:23:05 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:50 +0000 Received: from localhost ([127.0.0.1]:42611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMtF-00022j-J3 for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsw-00021e-EJ for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsq-0005kt-Vg for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=N+f17xuQ3s0gSLStY0xmF+2pS+hRppQgrOqxs0SPO4c=; b=j9iMVqJ/QOEaLzG0icft hZRgBOHf5lYrflBrQP49fqpOrDwmH8eorW2GjidLYJnqms/U9iSYkEtvILyJWFAwYlgijI7FJEoOI OZtaFsxl6hi2qbitUlc54eOLUdxiVh405f94Dplm5e1KchpaKY4aFOtPXmE/Mr9ai8hlKXUlDvvZ3 b+lfSbIRxtn8DP2haGK0AWzN9BBTecsbcD5vbXONl1f0x9PYIvLOwRauTc+yjChH8FmdCk77lW5BE VTdRnltRalBOglSg7CYCtcYlYU5AmpR0Q/OvCOD5V2eICYds+FbE/AVZBVXW9JBShdnC+4+Onzuu6 djaL0PbXVcP/ow==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsY-0001Tr-Nl for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:14 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:55 +0200 Message-Id: <20221022222100.18103-17-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-web.scm (python-openapi-schema-validator)[build-system]: Set to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove redundant phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/python-web.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index f5625cc305..370245de3a 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -79,6 +79,7 @@ (define-module (gnu packages python-web) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system copy) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix gexp) #:use-module (guix utils) @@ -1601,7 +1602,7 @@ (define-public python-openapi-schema-validator (sha256 (base32 "1swm8h74nhg63nxk347blwq9f1qn6iiq3zisndcvm7axkq3pc2df")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases @@ -1609,21 +1610,8 @@ (define-public python-openapi-schema-validator (add-after 'unpack 'remove-coverage-pytest-options (lambda _ (substitute* "pyproject.toml" - (("^--cov.*") "")))) - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) - (native-inputs (list python-poetry-core python-pypa-build python-pytest)) + (("^--cov.*") ""))))))) + (native-inputs (list python-poetry-core python-pytest)) (propagated-inputs (list python-isodate python-jsonschema From patchwork Sat Oct 22 22:20:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43998 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 C819227BBEA; Mon, 24 Oct 2022 05:24:51 +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_INVALID, DKIM_SIGNED,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 0B27827BBE9 for ; Mon, 24 Oct 2022 05:24:51 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjtv-0001u1-0S for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:57:03 -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 1omMtW-0004mN-SU for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtV-00061X-LO for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtV-00024m-H3 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 18/22] gnu: python-openapi-spec-validator: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773707871 (code B ref 58587); Sat, 22 Oct 2022 22:23:05 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:50 +0000 Received: from localhost ([127.0.0.1]:42613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMtG-00022l-0P for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMsy-00021o-Au for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMss-0005vp-MR for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=t890YTqTGXWI5CZ+gSgkW/OnCT6TiIFvfkvPiDSWrpw=; b=MpDTmkzvJU9bNCyQrNJy pUTqkUhxtR8BxM/dVmPeIs4TEgMQU5McXkXsvCGFzhJNYSMvhWsoJIc/TZ9Ril6dcpTjY5AoaERlH aSDv6/rDS0wAj/5auSja5PdBy7MJI9ikkcrX7q9nwkyrPPaTz/5sADyWpZ9f8Oede4H6lsw41a6Eb GABKVNoUyv48nKkefZ7fHeK//uTO9ujNIxcK9IyEVE4J7W3x/FUFpBN9R8aYJ6ILARgq4EGRc8T7I XYwmJYc8wZX/qoLnxBpkWSjyCG14JFNVyMSoi5z4GF2vOt9C0u+J+7o0FTVEmW0xUxwwPv8sE/XC1 ttH1WBuvQqyUqA==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMss-0001Ut-8G for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:26 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:56 +0200 Message-Id: <20221022222100.18103-18-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-web.scm (python-openapi-spec-validator)[build-system]: Set to PYPROJECT-BUILD-SYSTEM. [arguments]: Add #:test-flags. Remove obsolete phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/python-web.scm | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 370245de3a..cbc515fc64 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1643,33 +1643,19 @@ (define-public python-openapi-spec-validator (sha256 (base32 "1q09sjh4hsc0c8yqbd97h5mp6rwh427y6zyn8kv8wljk6sa0fs4q")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list + ;; The example tests attempt to fetch resources from the Internet + ;; (see: https://github.com/p1c2u/openapi-spec-validator/issues/151). + #:test-flags #~'("-vv" "-k" "not Example and not Exampe") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'remove-coverage-pytest-options (lambda _ (substitute* "pyproject.toml" - (("^--cov.*") "")))) - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" - ;; The example tests attempt to fetch resources from - ;; the Internet (see: - ;; https://github.com/p1c2u/openapi-spec-validator/issues/151). - "-k" "not Example and not Exampe")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) - (native-inputs (list python-poetry-core python-pypa-build python-pytest)) + (("^--cov.*") ""))))))) + (native-inputs (list python-poetry-core python-pytest)) (propagated-inputs (list python-jsonschema python-openapi-schema-validator From patchwork Sat Oct 22 22:20:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43829 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 F1D0A27BBEA; Mon, 24 Oct 2022 01:32:28 +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_INVALID, DKIM_SIGNED,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 0CEF027BBE9 for ; Mon, 24 Oct 2022 01:32:28 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjuQ-00022r-7t for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:57:34 -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 1omMtW-0004mM-Fo for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtW-00061d-96 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtV-00024t-VZ for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 19/22] gnu: python-path: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773707878 (code B ref 58587); Sat, 22 Oct 2022 22:23:05 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:50 +0000 Received: from localhost ([127.0.0.1]:42615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMtG-00022u-Dd for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMt0-00021r-C9 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsu-0005xq-6v for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=ugtHkPMJnvHz4KtofKeJaYV1q2f3vogpmpFCaTmbtLs=; b=q4MT7vIpsSx6AJEYb4B5 Kr0KpAA2gvIP6FplLONvlVmbp6VzlukHKuIFRxDYOqsaTSY4b2BLNeeEvFIpxjmXUZ3/cMC2fggzj Nn/Ize3xeEY1PhymElGYC0NvXlyLOYzuETz/L3N8+yWYGR8wmWHcG2jpKYYBLfl3a9Vr7kt4bvWHA hmGn0aNs7Yd4jF19qM005befsd3cu6E8Jr18KmH9QbWV/gdyrbwYgDexX2rJTJ0Zc3cm7bhVlfA09 +alUsdqx8bU+e5kjn5F1DUBAtub7VmWHkIjcTxKnG070iDrtu67WNzaxODUvYQ4giNn75LY/QjJRM o8X3CyfWu0Uc0A==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMst-0001Uz-P1 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:27 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:57 +0200 Message-Id: <20221022222100.18103-19-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-path-bootstrap)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove #:phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. (python-path): Remove #:phases. Add #:test-flags. --- gnu/packages/python-xyz.scm | 42 +++++++++++-------------------------- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f4113ca351..72a516e6fb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12548,25 +12548,10 @@ (define-public python-path-bootstrap (uri (pypi-uri "path" version)) (sha256 (base32 "0lig13gxnfv98v790db1smvsbd3mnj7y8rwyiwhfi6xiqibygwms")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - (list - #:tests? #f - #:phases - #~(modify-phases %standard-phases - ;; XXX: PEP 517 manual build/install procedures copied from - ;; python-isort. - (replace 'build - (lambda _ - ;; ZIP does not support timestamps before 1980. - (setenv "SOURCE_DATE_EPOCH" "315532800") - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) - (native-inputs (list python-pypa-build python-setuptools-scm)) + (list #:tests? #f)) + (native-inputs (list python-setuptools-scm)) (home-page "https://github.com/jaraco/path") (synopsis "Object-oriented file system path manipulation library") (description "@code{path} (formerly @code{path.py}) implements path @@ -12582,18 +12567,15 @@ (define-public python-path (package-arguments python-path-bootstrap) ((#:tests? _ #f) (not (%current-target-system))) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; Do not test the myproject.toml build as it tries to pull - ;; dependencies from the Internet. - (invoke "pytest" "-vv" "-k" - (string-append - "not project " - ;; This tests assumes a root user exists. - "and not test_get_owner"))))))))) + ((#:test-flags flags #~'()) + #~(append (list "-vv" "-k" + (string-append + ;; Do not test the myproject.toml build as it tries + ;; to pull dependencies from the Internet. + "not project " + ;; This tests assumes a root user exists. + "and not test_get_owner")) + #$flags)))) (native-inputs (modify-inputs (package-native-inputs python-path-bootstrap) (append python-appdirs From patchwork Sat Oct 22 22:20:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 44020 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 7BB1627BBEA; Mon, 24 Oct 2022 05:54:25 +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_INVALID, DKIM_SIGNED,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 2C6DB27BBE9 for ; Mon, 24 Oct 2022 05:54:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjul-0002BG-HH for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:57:55 -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 1omMtW-0004mO-To for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -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 1omMtW-00061i-MJ for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtW-000251-HK for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 20/22] gnu: python-cattrs: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773717885 (code B ref 58587); Sat, 22 Oct 2022 22:23:06 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:51 +0000 Received: from localhost ([127.0.0.1]:42617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMtG-000231-Qc for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMt2-00021y-B7 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsv-0005y1-TW for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=UjL68gIV6gQLzYbnz0lGlj0zIVraZa4yOndzx28/gkQ=; b=HffuxuLrqw79k0UscnOW gFtygy21F4Tyv0//jVYDvLdxF4VI4vmE7nbb+WqxbDxck8pw0HxvkJLBIjQBHna8oqzldiQAubtUY 9zV0pfBZx1Y119/lHu7sOkTv0BynRizN73YwtWwajwiky4E8vEhuqX+un1w/9Qah1ywpdsgCF+Zid q1N0gp1nbwdGsFubpKVtm6AMckepMBoPKmUz0b17JhI55COCau6A/MWTJ6t53vMe5cwYrMVjOpVRI UKhTxqa+08NQrd5Om9vW7/tfAkF2joUb0QyNXreSvVmQlyEP0JybqhqzNF0tnBZeIXL7HVGyRN/31 RwuLkMmcxUG2lw==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsv-0001V4-EV for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:29 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:58 +0200 Message-Id: <20221022222100.18103-20-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-cattrs)[build-system]: Set to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove obsolete phases. [native-inputs]: Remove PYTHON-PYPA-BUILD. --- gnu/packages/python-xyz.scm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 72a516e6fb..a8b94b0acb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17028,12 +17028,11 @@ (define-public python-cattrs (sha256 (base32 "1n0h25gj6zd02kqyl040xpdvg4hpy1j92716sz0rg019xjqqijqb")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases - ;; XXX: PEP 517 manual build copied from python-isort. (add-after 'unpack 'adjust-for-older-attrs ;; Our older attrs package is using the 'attr' rather than 'attrs' ;; namespace. @@ -17042,14 +17041,6 @@ (define-public python-cattrs (substitute* (find-files "." "\\.py$") (("from attrs\\b") "from attr")))) - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -17067,7 +17058,6 @@ (define-public python-cattrs python-msgpack python-poetry-core python-pymongo ;for the bson module - python-pypa-build python-pytest python-pytest-xdist)) (propagated-inputs From patchwork Sat Oct 22 22:20:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43852 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 242E727BBEA; Mon, 24 Oct 2022 02:48:58 +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_INVALID, DKIM_SIGNED,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 C7EB527BBE9 for ; Mon, 24 Oct 2022 02:48:57 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjuq-0002DW-Qd for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:58:00 -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 1omMtX-0004nE-Af for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:07 -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 1omMtX-000620-3X for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtW-000258-VC for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 21/22] gnu: python-scikit-build: Switch to pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773717893 (code B ref 58587); Sat, 22 Oct 2022 22:23:06 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:51 +0000 Received: from localhost ([127.0.0.1]:42619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMtH-000238-5x for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMt4-000226-8K for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsx-0005yB-Hb for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=kNQL5z8dECvUJ5FQlPznZtDUBezkD1whnMwh8TzuNVc=; b=YTHoWU1jvIpnv/mhfbmV PN9eSuwDjtuJI0PfyXHNAAL1Xn7Tr4+kuMVxENxYBZ7YZuO04h3qhIF9PlpqPESkF00saLdlkSIxT toDQ3UGSRzCVsKg4maYpYLQEjtqTd3S3eLrDXpAonz8kItrqWIyW0af7rt9yf8TfJSmLLBNHxy3mU ANetwge7RKaoA3t7Yp++Phu7I61hTP+B/6M7A/uIkGKcwhAIDTzydffBBLSbqRMxNRlmVAy+s0GnU e5C2jLsV0tI7VQ4RR/peE+ToM1jHDS5UXUweCpAQ3kQCMlZ5H9MqgK7a6aEcZWuoBa2m/3qxMyoY9 Jk1cXgrHrwlAlQ==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsx-0001V9-3F for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:31 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:20:59 +0200 Message-Id: <20221022222100.18103-21-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-scikit-build)[build-system]: Set to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove obsolete phases. [native-inputs]: Remove PYTHON-PYPA-BUILD and PYTHON-WHEEL. --- gnu/packages/python-xyz.scm | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a8b94b0acb..bae4c385c0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -27859,7 +27859,7 @@ (define-public python-scikit-build (uri (pypi-uri "scikit-build" version)) (sha256 (base32 "1wx1m9vnxnnz59lyaisgyxldp313kciyd4af8lf112vb8vbjy9yk")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases @@ -27870,11 +27870,6 @@ (define-public python-scikit-build (("^(CMAKE_DEFAULT_EXECUTABLE = ).*" _ head) (format #f "~a ~s~%" head (search-input-file inputs "bin/cmake")))))) - ;; XXX: PEP 517 manual build copied from python-isort. - (replace 'build - (lambda _ - (setenv "SOURCE_DATE_EPOCH" "315532800") - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -27900,12 +27895,7 @@ (define-public python-scikit-build ;; nondeterministically (see: ;; https://github.com/scikit-build/scikit-build/issues/711). "and not test_generator_cleanup " - "and not test_generator_selection "))))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) + "and not test_generator_selection ")))))))) (native-inputs (list cmake-minimal gfortran @@ -27916,15 +27906,13 @@ (define-public python-scikit-build python-mock python-packaging python-path - python-pypa-build python-pytest python-pytest-cov python-pytest-mock python-pytest-virtualenv python-pytest-xdist python-requests - python-setuptools-scm - python-wheel)) + python-setuptools-scm)) (propagated-inputs (list python-distro python-packaging python-wheel)) (home-page "https://github.com/scikit-build/scikit-build") From patchwork Sat Oct 22 22:21:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43849 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 23F5927BBEA; Mon, 24 Oct 2022 02:47: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 CDD6427BBE9 for ; Mon, 24 Oct 2022 02:47:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjuw-0002FK-6m for patchwork@mira.cbaines.net; Sun, 23 Oct 2022 18:58:06 -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 1omMtX-0004nF-Q9 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:07 -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 1omMtX-000625-G6 for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omMtX-00025G-BR for guix-patches@gnu.org; Sat, 22 Oct 2022 18:23:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH v3 22/22] gnu: python-deepmerge: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Oct 2022 22:23:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58587@debbugs.gnu.org Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.16664773727899 (code B ref 58587); Sat, 22 Oct 2022 22:23:07 +0000 Received: (at 58587) by debbugs.gnu.org; 22 Oct 2022 22:22:52 +0000 Received: from localhost ([127.0.0.1]:42621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMtH-00023G-IF for submit@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omMt6-00022E-5B for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsz-0005yC-5z for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=uiBkeueu3Qh/G7xorWIYa4lSOEtMYQyNbytVOdcNxOM=; b=bCiCm5mTqWKVYnvhO9EA LgNN1FURPoRrp4QLhEf1wNmagdyh1p0GJX80rxqbet5d/sP46G+BkQYPVKFPXyiNPJhEZPaSGuRGi LYhdQOH4nmqmWVKQeTFReEYFwKT6ZnNVrG6Uguw62EeE7os9k5AtvbXQPklEfW1nu6mdfP8l4m7uO EFCyf2RCDqZ3OPzOJTOG7vpgwg1vasjRwqZ6iIX9ek8U6q5DgRY5ImdyTi0CM3Y2nhhrMeGMCJ9H5 jqIZeFkkH8PJ30hT2Fwtj3HQ+lbDoxCEE8sddQcKVcMHKUVbiha3UpT+Igy+nTxNsct2CHL2ILmNH 2ErGNlPlSYOcKw==; Received: from [84.214.173.6] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omMsy-0001VE-K7 for 58587@debbugs.gnu.org; Sat, 22 Oct 2022 18:22:32 -0400 From: Marius Bakke Date: Sun, 23 Oct 2022 00:21:00 +0200 Message-Id: <20221022222100.18103-22-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221022222100.18103-1-marius@gnu.org> References: <87eduzu18u.fsf@gnu.org> <20221022222100.18103-1-marius@gnu.org> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-deepmerge)[build-system]: Set to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove obsolete phases. [native-inputs]: Remove PYTHON-PYPA-BUILD and PYTHON-WHEEL. --- gnu/packages/python-xyz.scm | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index bae4c385c0..cddd525b0c 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -30259,34 +30259,17 @@ (define-public python-deepmerge (uri (pypi-uri "deepmerge" version)) (sha256 (base32 "06hagzg8ccmjzqvszdxb52jgx5il8a1jdz41n4dpkyyjsfg7fi2b")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'build 'set-version (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version) - ;; ZIP does not support timestamps before 1980. - (setenv "SOURCE_DATE_EPOCH" "315532800"))) - (replace 'build - (lambda _ - (invoke "python" "-m" "build" "--wheel" - "--no-isolation" "."))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) (native-inputs - (list python-pypa-build - python-setuptools-scm - python-pytest - python-wheel)) + (list python-setuptools-scm + python-pytest)) (home-page "https://deepmerge.readthedocs.io/en/latest/") (synopsis "Merge nested data structures") (description