From patchwork Mon Oct 17 20:11:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43474 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 8EEA127BBEA; Mon, 17 Oct 2022 21:14:33 +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 82F4C27BBE9 for ; Mon, 17 Oct 2022 21:14:32 +0100 (BST) Received: from localhost ([::1]:34354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWVL-000710-FB for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTx-0006sN-8b for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTw-0002Gu-3z for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTv-0007Op-Up for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 01/14] gnu: python-setuptools: Move to python-build. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603753328157 (code B ref 58587); Mon, 17 Oct 2022 20:13:03 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:13 +0000 Received: from localhost ([127.0.0.1]:50115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWT6-0007K3-9v for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWT5-0007Jl-1E for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWSz-0002BR-2W; Mon, 17 Oct 2022 16:12:05 -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=VwqjlP4H28xnE7A2J+pl OqKIBau7cqe3O/Vqnp4FvsB8xlF0SSo86P8n7GEFv0DUVs80jQaUF6sJzPYbkAcV4J5bVvCEK++Fa /9SixLoW0XNWF5d21h7Y+woLZEzutojL8Rm3o2r2FfEQpbx8k0011b7x/Os/+6xqT0+fZf0ldPNGj XmeEh1aqmCG9bm7Z3f0M9dTkzur6v1MMUJxQpAcMC0DGpQ23fyDA6lxTjgS3rfnbBx/t7Zt+Cz8I8 vomNAoYANHq+ogdAAI40jEI9Ip5YiSd8anVFgkXzEnexjZLadUqzKN7Zo5fQgOb4Aj8mriI69sgfR PM8m8OBMs8/lIQ==; Received: from [84.211.203.64] (port=45504 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWSy-0004yW-D7; Mon, 17 Oct 2022 16:12:04 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:48 +0200 Message-Id: <20221017201201.4808-1-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017200624.4076-1-marius@gnu.org> References: <20221017200624.4076-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 * 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 Mon Oct 17 20:11:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43475 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 EA06C27BBE9; Mon, 17 Oct 2022 21:14:34 +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 6E66227BBED for ; Mon, 17 Oct 2022 21:14:33 +0100 (BST) Received: from localhost ([::1]:34346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWVM-00070G-3o for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTx-0006sj-BZ for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTx-0002Gz-1a for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTw-0007P4-SU for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 02/14] gnu: pypy: Move to separate module. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603754428223 (code B ref 58587); Mon, 17 Oct 2022 20:13:04 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:24 +0000 Received: from localhost ([127.0.0.1]:50127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTG-0007Kd-94 for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWT5-0007Jn-Ry for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT0-0002Bz-M7; Mon, 17 Oct 2022 16:12: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=M/OxDubfgI4sdCas+OAtAWX3W3HWjW3Vxyq2/441R/k=; b=E3BkAmTCiBswc0Q6wpp7 Y2WaidL6Wz2NnQuaaPn2Kro0aYLdl0WJ5ToyxWPF9lZugZWScWReqlxw6hwXgRhWrdMF3HtxbmgLN SHe1+QtSmEIl8tsaWCR17lbDAsD91+8OyJNH6D6OeQaevfRDUePx3Za9v/ji97V6+9OyjsloG72vg 7RTaQ6syLfVc0A+Cxy5vf56ko6Gw7a+dm/SpE2c5xx1ETORjHLE60olUXKfrycfPtYR1n0/6DZwX+ 9jts1Z0vV+1RBzIos0uJdVSn6uwfu57nlkNpCT0WFX5bvJ+UW3PMuEkwV4LB6DfjVZ7rfE7sdEVrS ZhOHY/qP+CO0JA==; Received: from [84.211.203.64] (port=45518 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT0-0004z3-73; Mon, 17 Oct 2022 16:12:06 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:49 +0200 Message-Id: <20221017201201.4808-2-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 | 167 ------------------------ 3 files changed, 274 insertions(+), 167 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..b54e393eb4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -89,7 +89,6 @@ (define-module (gnu packages python) #: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) @@ -736,169 +735,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 Mon Oct 17 20:11:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43471 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 2F05D27BBEA; Mon, 17 Oct 2022 21:14:10 +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 D256D27BBE9 for ; Mon, 17 Oct 2022 21:14:09 +0100 (BST) Received: from localhost ([::1]:34328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWUp-0006x0-Bx for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:13:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTx-0006sK-8d for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTw-0002Gx-ID for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTw-0007Ox-DG for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 03/14] 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: Mon, 17 Oct 2022 20:13: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.166603754228190 (code B ref 58587); Mon, 17 Oct 2022 20:13:04 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:22 +0000 Received: from localhost ([127.0.0.1]:50119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTA-0007KR-88 for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWT7-0007Jq-F6 for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT2-0002CA-9r for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:08 -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=F7oj3UNTgfTto5fEKW0d v/TD0rBDb6JTFReKa1P4SEWrWycmCG+I8Y3PwEKQVHFeK3xn8IN13XbvbLGmK2DIKB4SONJMjVIyl WCRVqMif6jdRWI0WQP4ILaQUVCj1NsHCWQpy9qix9hgaEf39zGOkUd652Bh0pMI120QVkJKBMC/o7 5UDd0BGBvoM6Rcd4fGCTeRBbMJuPA+DFUOZHljW23MZNOG2Mb+o4wavXxcO7YxAmkqFbTjHj+KnLi ptrvmeSVEUnp5twvG/2C4dz+lLODYmDncOhpqdvE99YIVrOVWTXu6PP0a/UcU9w+8k5Tuhs8GUvP8 dy9izJtGTGYQhg==; Received: from [84.211.203.64] (port=45524 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT1-0004zn-Q5 for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:08 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:50 +0200 Message-Id: <20221017201201.4808-3-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:11:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43483 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 4441D27BBEA; Mon, 17 Oct 2022 21:15:33 +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 6BCF227BBE9 for ; Mon, 17 Oct 2022 21:15:29 +0100 (BST) Received: from localhost ([::1]:50394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWWG-0000Fo-G5 for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:15:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTz-0006xM-1v for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTy-0002Hw-Px for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTy-0007PY-LB for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 04/14] build-system: Add pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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 Cc: Lars-Dominik Braun Received: via spool by 58587-submit@debbugs.gnu.org id=B58587.166603755628302 (code B ref 58587); Mon, 17 Oct 2022 20:13:06 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:36 +0000 Received: from localhost ([127.0.0.1]:50148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTR-0007ML-TD for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTA-0007Jw-8H for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT5-0002Cb-2T; Mon, 17 Oct 2022 16:12:11 -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=kvcBYIgshpDeQaAkYkS5TE6V0wR3OW8oHzvoMqXrvDw=; b=Tx9pnCZVvQMWAXS3Yaq3 7IwsNSkngQuUW//ZnNHSI8vSNxqE3zCbhI1OQnXLfwXDo7nA0x38JXGqlg7nO5FkJhlBb3dbbSW5t 3MJO5onyNXzL09kM3+gT1DMc78icLfmICia8OAOgIqPF5ybXaAZuWA1rVQphNna3dnGFONXHM9AQv YqtsHSlgWLRTnvZGE3HZtmAUL7znvTVp24DtCGnLuuXWFWIlHV5XngTRhoiH7Nk5k/69PjTemJvGX 7+kRtFks4590UpAqWbt1cET4Ly3zf90BKVFoqDoRfntfcCvDeuUO85zjZoOPMIYimmUJThBtoVjFz QtKCerrAspn6lA==; Received: from [84.211.203.64] (port=45530 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT4-0004zz-AT; Mon, 17 Oct 2022 16:12:10 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:51 +0200 Message-Id: <20221017201201.4808-4-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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. * 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 + gnu/local.mk | 1 + .../aux-files/python/sanity-check-next.py | 98 ++++ gnu/packages/python-commencement.scm | 64 +++ gnu/packages/python.scm | 13 + guix/build-system/pyproject.scm | 148 ++++++ guix/build/pyproject-build-system.scm | 460 ++++++++++++++++++ 7 files changed, 786 insertions(+) create mode 100644 gnu/packages/aux-files/python/sanity-check-next.py create mode 100644 gnu/packages/python-commencement.scm 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/gnu/local.mk b/gnu/local.mk index bf598cec8b..b6e0d262be 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -511,6 +511,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/python-build.scm \ %D%/packages/python-check.scm \ %D%/packages/python-compression.scm \ + %D%/packages/python-commencement.scm \ %D%/packages/python-crypto.scm \ %D%/packages/python-science.scm \ %D%/packages/python-web.scm \ 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-commencement.scm b/gnu/packages/python-commencement.scm new file mode 100644 index 0000000000..011ba2c38d --- /dev/null +++ b/gnu/packages/python-commencement.scm @@ -0,0 +1,64 @@ +;;; 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 (gnu packages python-commencement) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix build-system trivial) + #:use-module (gnu packages) + #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26)) + +(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-pypa-build + python-pip + 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)))) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b54e393eb4..377fd1c282 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -677,6 +677,19 @@ (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 micropython (package (name "micropython") diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.scm new file mode 100644 index 0000000000..8e320529cc --- /dev/null +++ b/guix/build-system/pyproject.scm @@ -0,0 +1,148 @@ +;;; 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 + ,@%gnu-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-commencement)))) + (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..141d4d849f --- /dev/null +++ b/guix/build/pyproject-build-system.scm @@ -0,0 +1,460 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013, 2015, 2016, 2018, 2019 Ludovic Courtès +;;; Copyright © 2013 Andreas Enge +;;; Copyright © 2013 Nikita Karetnikov +;;; Copyright © 2015, 2018 Mark H Weaver +;;; Copyright © 2016 Hartmut Goebel +;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2018 Arun Isaac +;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer +;;; Copyright © 2020 Jakub Kądziołka +;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2021 Maxime Devos +;;; +;;; The above copyright is taken from python-build-system. Contributions +;;; made only to this module are listed below: +;;; 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 gnu-build-system) #:prefix gnu:) + #: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. +;; +;; Caveats: +;; - There is no support for in-tree build backends. + +;; 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* (sanity-check #:key tests? inputs outputs #:allow-other-keys) + "Ensure packages depending on this package via setuptools work properly, +their advertised endpoints work and their top level modules are importable +without errors." + (let ((sanity-check.py (assoc-ref inputs "sanity-check.py"))) + ;; Make sure the working directory is empty (i.e. no Python modules in it) + (with-directory-excursion "/tmp" + (invoke "python" sanity-check.py (site-packages inputs outputs))))) + +(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 (python-version python) + (let* ((version (last (string-split python #\-))) + (components (string-split version #\.)) + (major+minor (take components 2))) + (string-join major+minor "."))) + +(define (python-output outputs) + "Return the path of the python output, if there is one, or fall-back to out." + (or (assoc-ref outputs "python") + (assoc-ref outputs "out"))) + +(define (site-packages inputs outputs) + "Return the path of the current output's Python site-package." + (let* ((out (python-output outputs)) + (python (assoc-ref inputs "python"))) + (string-append out "/lib/python" (python-version python) "/site-packages"))) + +(define (add-installed-pythonpath inputs outputs) + "Prepend the site-package of OUTPUT to GUIX_PYTHONPATH. This is useful when +running checks after installing the package." + (setenv "GUIX_PYTHONPATH" (string-append (site-packages inputs outputs) ":" + (getenv "GUIX_PYTHONPATH")))) + +(define* (add-install-to-pythonpath #:key inputs outputs #:allow-other-keys) + "A phase that just wraps the 'add-installed-pythonpath' procedure." + (add-installed-pythonpath inputs outputs)) + +(define* (add-install-to-path #:key outputs #:allow-other-keys) + "Adding Python scripts to PATH is also often useful in tests." + (setenv "PATH" (string-append (assoc-ref outputs "out") + "/bin:" + (getenv "PATH")))) + +(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))) + (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* (wrap #:key inputs outputs search-paths #:allow-other-keys) + (define (list-of-files dir) + (find-files dir (lambda (file stat) + (and (eq? 'regular (stat:type stat)) + (not (wrapped-program? file)))))) + + (define bindirs + (append-map (match-lambda + ((_ . dir) + (list (string-append dir "/bin") + (string-append dir "/sbin")))) + outputs)) + + ;; Do not require "bash" to be present in the package inputs + ;; even when there is nothing to wrap. + ;; Also, calculate (sh) only once to prevent some I/O. + (define %sh (delay (search-input-file inputs "bin/bash"))) + (define (sh) (force %sh)) + + (let* ((var `("GUIX_PYTHONPATH" prefix + ,(search-path-as-string->list + (or (getenv "GUIX_PYTHONPATH") ""))))) + (for-each (lambda (dir) + (let ((files (list-of-files dir))) + (for-each (cut wrap-program <> #:sh (sh) var) + files))) + bindirs))) + +(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* (enable-bytecode-determinism #:rest _) + "Improve determinism of pyc files." + ;; Use deterministic hashes for strings, bytes, and datetime objects. + (setenv "PYTHONHASHSEED" "0") + ;; Prevent Python from creating .pyc files when loading modules (such as + ;; when running a test suite). + (setenv "PYTHONDONTWRITEBYTECODE" "1")) + +(define* (ensure-no-cythonized-files #:rest _) + "Check the source code for @code{.c} files which may have been pre-generated +by Cython." + (for-each + (lambda (file) + (let ((generated-file + (string-append (string-drop-right file 3) "c"))) + (when (file-exists? generated-file) + (format #t "Possible Cythonized file found: ~a~%" generated-file)))) + (find-files "." "\\.pyx$"))) + +(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 gnu:%standard-phases + (add-after 'unpack 'enable-bytecode-determinism + enable-bytecode-determinism) + (add-after 'enable-bytecode-determinism 'ensure-no-cythonized-files + ensure-no-cythonized-files) + (replace 'set-SOURCE-DATE-EPOCH set-SOURCE-DATE-EPOCH) + (delete 'bootstrap) + (delete 'configure) ;not needed + (replace 'build build) + (delete 'check) ;moved after the install phase + (replace 'install install) + (add-after 'install 'add-install-to-pythonpath add-install-to-pythonpath) + (add-after 'add-install-to-pythonpath 'add-install-to-path + add-install-to-path) + (add-after 'add-install-to-path 'wrap wrap) + ;; 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-after 'check 'sanity-check sanity-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 gnu:gnu-build #:inputs inputs #:phases phases args)) + +;;; pyproject-build-system.scm ends here From patchwork Mon Oct 17 20:11: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: 43480 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 208D027BBEA; Mon, 17 Oct 2022 21:15:27 +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 CBC8627BBE9 for ; Mon, 17 Oct 2022 21:15:26 +0100 (BST) Received: from localhost ([::1]:50382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWWD-0008U0-O7 for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:15:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTx-0006uv-Qo for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTx-0002HK-Gt for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTx-0007PC-BZ for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 05/14] gnu: python-autopage: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603754528237 (code B ref 58587); Mon, 17 Oct 2022 20:13:05 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:25 +0000 Received: from localhost ([127.0.0.1]:50133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTI-0007LF-Ga for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTB-0007K4-RQ for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT6-0002D6-L1 for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:12 -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=gfFD4wcD/C/wzOY4zXb2DoVNnC85oTohumUymid0//0=; b=J7yvHLrWvhpm8ZgYmzNb icMgO+Ay4oFrB8L1zvu3ZTw32hVS9nuWIVP1jnIB6qdYW6/UmQBMMjEEErcoXT8UGC+fqvPthZb5c lwtrwGXnMdWXQiGHW8t8DkxIc+7ZtLVKoM6y//hWYkijJivhP2fePCEjMtgclTrE9u6O0FGozrBVM Z66suY1P5O66IcBCEVJGjREmP0nFXU/2mx9HSYVa47thvJt2sAdcTUQsUb7eg675ScR4crIRSfO4+ rUlFRlJ5sjnN+ubzA3ObFoEBwiFcVJvY/p1zVXf0mdsfl9UOGSLinQXnRKWHshAvjTAz8x0KNmegx YuFQ7monasFL2g==; Received: from [84.211.203.64] (port=33082 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT6-00050D-21 for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:12 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:52 +0200 Message-Id: <20221017201201.4808-5-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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-autopage)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove redundant phases. --- gnu/packages/python-xyz.scm | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1ded6f0384..42935cbaaa 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -259,6 +259,7 @@ (define-module (gnu packages python-xyz) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (srfi srfi-1) @@ -6959,33 +6960,16 @@ (define-public python-autopage (sha256 (base32 "169ixll1ncm2a2pcc86665ikjv2lrzs10p6c1w4yj55p3gk3xgh1")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases - ;; Do a manual PEP 517 style build/install procedure until the - ;; python-build-system overhaul is merged. - (replace 'build - (lambda _ - ;; ZIP does not support timestamps before 1980. - (let ((circa-1980 (* 10 366 24 60 60))) - (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980)) - (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))) (add-before 'check 'disable-e2e-tests (lambda _ ;; These tests rely on KeyboardInterrupts which do not ;; work in the build container. - (delete-file "autopage/tests/test_end_to_end.py"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) + (delete-file "autopage/tests/test_end_to_end.py")))))) (native-inputs (list python-pypa-build python-setuptools From patchwork Mon Oct 17 20:11: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: 43478 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 848C027BBEA; Mon, 17 Oct 2022 21:14:41 +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 414DC27BBE9 for ; Mon, 17 Oct 2022 21:14:41 +0100 (BST) Received: from localhost ([::1]:55890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWVU-00079L-32 for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTy-0006w8-7q for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTx-0002HU-Ue for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTx-0007PJ-QZ for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 06/14] gnu: flair: Switch to pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603754528245 (code B ref 58587); Mon, 17 Oct 2022 20:13:05 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:25 +0000 Received: from localhost ([127.0.0.1]:50135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTI-0007LO-Th for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTF-0007KS-9O for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51252) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT8-0002DR-Ja for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:14 -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=L3sg34qs4y8ba07LgNmB Ng0pDE2+0mBD7TVVsXyqnYYtRkRgeb1AEfCzVWi/s9cCAkSlRGif4HPYq99giJDO8+lq1EQ+TKk0Z bTPXttgZhh2xQGpvZzziHw8eUrWABESSIJTQI9gd9P6BHVUbq4GKtkj1odJwhphtmHCsLG03j7l+M oZpyGJT+sYZUmtS6fEubrySk2U2gtA8rfC7XpAKHfqlnYaRbwe4PE3jBMJslEXW7rebCu0cmYCBEw G1NFf6VlyXSuIXAvG9CwVmMA0Ko64kx30BftbkN9KVrkwIM/tAXW1ZaoZsNGhg2Um9IIfK4oKL/00 muAGSXj/1TwsOw==; Received: from [84.211.203.64] (port=33092 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT7-00050Q-OU for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:14 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:53 +0200 Message-Id: <20221017201201.4808-6-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:11:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43476 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 3A5E727BBEA; Mon, 17 Oct 2022 21:14:36 +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 EC5CD27BBE9 for ; Mon, 17 Oct 2022 21:14:35 +0100 (BST) Received: from localhost ([::1]:47442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWVO-000724-Rl for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTy-0006ws-KB for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTy-0002Hh-Bs for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTy-0007PQ-7J for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 07/14] gnu: python-pydyf: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603754628253 (code B ref 58587); Mon, 17 Oct 2022 20:13:06 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:26 +0000 Received: from localhost ([127.0.0.1]:50139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTJ-0007LW-Bc for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTG-0007KU-Rg for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTB-0002Di-Ly for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:17 -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=ASVP/u8vvkQe9oT+t2HB kMpp5c2zkeCRY/DagFvy1Xr36LkUr6y0NheDKPMl8sY9FaxE4BjBQm+2yth39uoSxbH9rWnMpa3nU Kc8QI45FVGgWH0vLbE2eXmhfmwOJBTmzEVbzlM3XWdyM+43oME9esXJC1E7CTS7MIwBTLCILFCUqQ epgl5vG1wjO63rcZlnffWRH6Av9SRzgo1+A41eO+KB0n0o3MBSoycAZLqWtn88CKT7tBNCSbsvaVV YvUqgxp3WHe3PaH+K+E4sCTx52E/isO3VQbu3/OQukZwFw9W7WGxgzXs4VDJafkXEMUfUhu1kBOGc E9Ccx52rZpmZ4g==; Received: from [84.211.203.64] (port=33104 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWT9-00050d-Qr for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:16 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:54 +0200 Message-Id: <20221017201201.4808-7-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:11: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: 43477 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 19E5227BBEA; Mon, 17 Oct 2022 21:14:38 +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 D080827BBE9 for ; Mon, 17 Oct 2022 21:14:37 +0100 (BST) Received: from localhost ([::1]:55858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWVQ-00074H-My for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTz-0006z1-H1 for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTz-0002I3-7F for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTz-0007Pf-2B for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 08/14] gnu: weasyprint: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603755628310 (code B ref 58587); Mon, 17 Oct 2022 20:13:07 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:36 +0000 Received: from localhost ([127.0.0.1]:50150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTU-0007MR-1c for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTH-0007KW-L8 for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTC-0002Do-Fr for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:18 -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=fgaGCq4lvEREAHae74Th Ek1xwAf/UHGLjFx9xHUdGKwT7BxMe5vKi6mId0h9Ob72RzIPm72o+7hOf//NlPMe6dDOrvh2lQysm Neq3gs40D9vEJX7xZZbcjR3xh1kAU08x0jApLSBfJ7RIxIWpeopLDA9q4N4LfpwWBXCK+FsFYNHty yUAJLgjpglZLLgiNxTk+kSbIZJA2kBajc6QwOgoV9Pb0RJm5fK3AccyFReRdZz8B4780wIO7kjaCo R0a/eHUuKic37LcnroJyZTHmFdxead20Ivf2o7BCz3+BcUhNVA/9h418saSL+s1TbCQwBn/LCgInd J5qqxGVsbawqaA==; Received: from [84.211.203.64] (port=33106 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTC-00050p-1J for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:18 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:55 +0200 Message-Id: <20221017201201.4808-8-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:11: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: 43482 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 D485727BBED; Mon, 17 Oct 2022 21:15:32 +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 5083627BBEA for ; Mon, 17 Oct 2022 21:15:32 +0100 (BST) Received: from localhost ([::1]:37488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWWJ-0000V5-Dd for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:15:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTz-00070Y-Ux for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWTz-0002IB-Mz for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWTz-0007Pn-H9 for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 09/14] gnu: python-glyphslib: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603755628317 (code B ref 58587); Mon, 17 Oct 2022 20:13:07 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:36 +0000 Received: from localhost ([127.0.0.1]:50152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTU-0007MZ-Cu for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTJ-0007KY-9i for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51282) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTE-0002E0-4b for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:20 -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=peqUQD6UK8mw3Do6BHEl lOrswGL7MuokCSQV/OTawgelb9jwuxABz5AEGkNB5OKBgemwcmGHiwQ9Mi7BQZNGGqbKlbjHgPEie Uk8bGfoqxWpR/bqwgbW6BkxaVj66siZaLTPFOUM/biAcmFMLmFLwdYwFr8ZgKVYQu2cVAYjlaaFMO 8L/1yg6jbRthOOE8qJnRb/fG3lzqxVdBP4ucjaHmkARF2n74b2vcBiff+NEsspQMpB5Y1nyBvq0yI 2yckv6Yj8F9PEdLj5B4OBk9W7Rd1W2xSYmrPvbOG5KySrpis2cSWxwHneTBrQ/3uhpm2RBkBClsq3 73IrovOHSZwAQw==; Received: from [84.211.203.64] (port=33110 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTD-000512-M9 for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:19 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:56 +0200 Message-Id: <20221017201201.4808-9-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:11: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: 43484 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 A6FAB27BBEA; Mon, 17 Oct 2022 21:15: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=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 858D327BBED for ; Mon, 17 Oct 2022 21:15:30 +0100 (BST) Received: from localhost ([::1]:37468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWWH-0000NS-IP for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:15:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWU0-00070b-De for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWU0-0002IK-64 for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWU0-0007Pu-1H for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 10/14] gnu: python-statmake: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13: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.166603755728324 (code B ref 58587); Mon, 17 Oct 2022 20:13:07 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:37 +0000 Received: from localhost ([127.0.0.1]:50154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTU-0007Mg-Ra for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTL-0007Kb-5b for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTG-0002E9-0Z for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:22 -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=N6aUtRsOB4xzluADF0a+ tkVMOKl3IAOqK6vUqOdzGUHYGExsFqlYBu5kVCY6qd7pct+dro6emiSbT2k7JixlB7+rwDwuKtUD3 PpEanzxkN+uUbALUzuobCn13iB7zDwvd3V5yrlJ6PflC0cE7QKScM7iPNDtu44SEC9x35BbMs+/Y4 jzNKKXna7OsoSHa7Q29f3PydYRLP8PSPswFQYYRyJb/mP+ojZfKm//zy2RiWwU6MPisUgC17HssR8 ZUl63XAZRC4XjhpndBgtCONoRcGzcpwkrRlprwDQSUNLIPzMKrxSsTF09VPg1C24xYXH3GodBoPq0 xYWMBCK1CtIUlA==; Received: from [84.211.203.64] (port=52326 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTF-00051C-9h for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:21 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:57 +0200 Message-Id: <20221017201201.4808-10-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:11: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: 43479 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 19AF427BBEA; Mon, 17 Oct 2022 21:14:48 +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 C397127BBE9 for ; Mon, 17 Oct 2022 21:14:47 +0100 (BST) Received: from localhost ([::1]:51958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWVa-0007Uk-KM for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWU0-00070d-Sx for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWU0-0002IQ-Kb for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWU0-0007Q1-Fi for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 11/14] gnu: python-ufolib2: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13:08 +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.166603755728332 (code B ref 58587); Mon, 17 Oct 2022 20:13:08 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:37 +0000 Received: from localhost ([127.0.0.1]:50156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTV-0007Mn-7z for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTM-0007L3-Pe for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTH-0002EJ-J0 for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:23 -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=Wim1CTo2dlhV8S/FHj84RmihJYCsrDvHelzNyUpn8vg=; b=bjkIMtqI/K+LSzaURDsj yXRZNlxHBROk/wyGAU5ZdhlQK59EEBUNB9kOE/uFY2+O3h8CrOwAFzcAGOnknUC/XIIBu+AbRm/Z2 MNnFh+KX3/m3QYQFTQCKrbPkpoagLqvIYJsCR7NPeM+Qi+AuhMAl6eexybFvV76oX+GYeEvs1p1KA qCc/YNdtPAc6W1Wl0r6PyU/ZtVMyImPf1grni4uMI5kr4a4XWeHQRR8mbogPdyYnsuhY5MwJSLQkX VRbJVc3V8L82k5aQl6UMVU2/FbakBcCy5z0hInM21zsM7YSQqWSdBsxvPRLUIivZuO7/c81WejtIK dEgHGuzJtH28zQ==; Received: from [84.211.203.64] (port=52338 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTH-00051O-4n for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:23 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:58 +0200 Message-Id: <20221017201201.4808-11-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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-ufolib2)[build-system]: Switch to PYPROJECT-BUILD-SYSTEM. [arguments]: Remove. [native-inputs]: Remove PYTHON-PYPA-BUILD and PYTHON-WHEEL. --- gnu/packages/fontutils.scm | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 5c95f9a427..46fbc2370a 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -1612,31 +1612,9 @@ (define-public python-ufolib2 (uri (pypi-uri "ufoLib2" version)) (sha256 (base32 "0yx4i8q5rfyqhr2fj70a7z1bp1jv7bdlr64ww9z4nv9ycbda4x9j")))) - (build-system python-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 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv")))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl))))))) + (build-system pyproject-build-system) (native-inputs - (list python-pypa-build - python-pytest - python-setuptools-scm - python-wheel)) + (list python-pytest python-setuptools-scm)) (propagated-inputs (list python-attrs python-fonttools-full)) (home-page "https://github.com/fonttools/ufoLib2") (synopsis "Unified Font Object (UFO) font processing library") From patchwork Mon Oct 17 20:11: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: 43481 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 0C31327BBEE; Mon, 17 Oct 2022 21:15: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=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 55E0C27BBEA for ; Mon, 17 Oct 2022 21:15:30 +0100 (BST) Received: from localhost ([::1]:37482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWWH-0000Ps-A3 for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:15:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWU2-00071G-HY for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWU1-0002IV-1y for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWU0-0007Q9-TN for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 12/14] 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: Mon, 17 Oct 2022 20:13:08 +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.166603757328392 (code B ref 58587); Mon, 17 Oct 2022 20:13:08 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:53 +0000 Received: from localhost ([127.0.0.1]:50170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTl-0007Ns-Fh for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTY-0007MP-Iy for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTT-0002Ee-DQ for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:35 -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=VDb5CjMcs53by2ULYPEL bge8UgF1YgR7MS/h2FMDQIULerTjdP6QIodGFTdPBGBS20srz1vpdB3XfbIzIxW6WlP22LsgY4xXh 3TPxmFrkZ+TTj6DnsvbOS1zXyV4UMYSJZOz2ovVWkdxMGBmZ5v0npgv3tuDXcQgQ8OEb/BAuYosRW s2Uf2S2P4TiLifGO5w+n3GYv7Jjo3lbz00RMlIQli1OlTFfJjUsH6q8vw9qBOGgPhx6DMCGqjJETE C75tNMCp2HaKqFxDOT2DCoWmSM41eDLoM5MhWMkcrPr49yQpnRJMYKbS5pN5kwoQ9ZSOBDAl61Jvk qg/j280mELZLfQ==; Received: from [84.211.203.64] (port=52352 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTI-00051Z-NR for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:28 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:11:59 +0200 Message-Id: <20221017201201.4808-12-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:12: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: 43472 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 8382B27BBEA; Mon, 17 Oct 2022 21:14:18 +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 3E2DD27BBE9 for ; Mon, 17 Oct 2022 21:14:18 +0100 (BST) Received: from localhost ([::1]:55894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWV2-0007At-Vg for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWU3-00071H-7J for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWU1-0002IW-Gg for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWU1-0007QG-C3 for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 13/14] gnu: python-tempora: Switch to pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13:09 +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.166603757428401 (code B ref 58587); Mon, 17 Oct 2022 20:13:09 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:12:54 +0000 Received: from localhost ([127.0.0.1]:50172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTl-0007Ny-Sh for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTb-0007NN-Mg for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTW-0002Fr-Hw for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:38 -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=Q57rJfDQ+t8r8xyR5ZuG 3XWxLMAc4mENBdx3qajoQ9F8OpuCDnL2ac2yZ8mRGjAVCEW1NYg2vc0457KDA21lj2RopPRR937h1 P5ykv6+3AznHBJTvWOCA5z0kFqHkoA5WuejS2NoRlsMn4WPCavQ/I3WHYwLuCkyYTqCWwfsk3D0I+ +HqDSIJF5VhOAfpn3MvkISfRa5wdQBc8zSl/Y0tJ/+9PoDy/naMDnxOHrSB4gy4J77Fv/WUp8bV5+ Sla+DKDCySzPGMGGoTHhzzQxFgPGtJbs8BlEt5gzyHz9CaqPSP8BV7c7gtGRc15EWT4BgNoXoNNKm P6I8XG81jGzUSg==; Received: from [84.211.203.64] (port=56516 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTS-000526-0v for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:38 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:12:00 +0200 Message-Id: <20221017201201.4808-13-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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 Mon Oct 17 20:12:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 43473 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 7DC1E27BBEE; Mon, 17 Oct 2022 21:14:33 +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 F27AD27BBEA for ; Mon, 17 Oct 2022 21:14:32 +0100 (BST) Received: from localhost ([::1]:55864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okWVM-00074t-2V for patchwork@mira.cbaines.net; Mon, 17 Oct 2022 16:14:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWU3-00071I-7E for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okWU1-0002IX-Uz for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okWU1-0007QO-Pm for guix-patches@gnu.org; Mon, 17 Oct 2022 16:13:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58587] [PATCH 14/14] gnu: python-pygmsh: Use pyproject-build-system. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 20:13:09 +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.166603758128414 (code B ref 58587); Mon, 17 Oct 2022 20:13:09 +0000 Received: (at 58587) by debbugs.gnu.org; 17 Oct 2022 20:13:01 +0000 Received: from localhost ([127.0.0.1]:50174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTm-0007O2-6V for submit@debbugs.gnu.org; Mon, 17 Oct 2022 16:13:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okWTe-0007NV-CB for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46758) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTZ-0002G5-4v for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:41 -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=UranploytYoi8ZFtwAUK 6nnlOH6sHhBAY0RvDB6pPMpOhLHvf01k1ymatvooI0sPmvYft8Y6luiC2C+gYDqzMmTQWBo3OaHQd TniARN4mrsJZzl3rsgfXyockr2SXA23KKGFfJa3tJC+jII5mluYwm3/NMPuO5bR0En/g8wk25bxa3 hFiAmFMcIqPYDnjWvBAtWIk62ZnTMhYMjXSV6YQzXBP0Aj9TLkng6eB7H++E/6yVyOSMf6VQavSs1 HpYOxUr1uS3E6GN8j4rHskuvQeyeuehZN4IwcdAatRXCbHgDCfN3Dl4nz3TIR+ot9c9j1ZY21Gy7b +Kre2RiyWmFOYg==; Received: from [84.211.203.64] (port=56524 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okWTX-00053i-LY for 58587@debbugs.gnu.org; Mon, 17 Oct 2022 16:12:40 -0400 From: Marius Bakke Date: Mon, 17 Oct 2022 22:12:01 +0200 Message-Id: <20221017201201.4808-14-marius@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221017201201.4808-1-marius@gnu.org> References: <20221017200624.4076-1-marius@gnu.org> <20221017201201.4808-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")