unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: 63139@debbugs.gnu.org
Cc: John Kehayias <john.kehayias@protonmail.com>
Subject: [bug#63139] [PATCH python 02/20] gnu: Add python-pyproject-hooks.
Date: Fri, 28 Apr 2023 05:50:04 +0000	[thread overview]
Message-ID: <76a7207a210365b23c078895f444109e240d2c7f.1682660104.git.john.kehayias@protonmail.com> (raw)
In-Reply-To: <cover.1682660104.git.john.kehayias@protonmail.com>

* gnu/packages/python-build.scm (python-pyproject-hooks): New variable.
---
 gnu/packages/python-build.scm | 41 +++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index 70719c44d4..45b9f52b68 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
 ;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>

 ;;;
 ;;; This file is part of GNU Guix.
@@ -381,6 +382,46 @@ (define-public python-pep517-bootstrap
       "Wrappers to build Python packages using PEP 517 hooks.")
      (license license:expat))))

+(define-public python-pyproject-hooks
+  (package
+    (name "python-pyproject-hooks")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pyproject_hooks" version))
+              (sha256
+               (base32
+                "1xaf4sharvacqlav6w3b38nc4j0rzg0p4axi7zamanbzp6cb4wgj"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:tests? #f ; disabled to avoid cycle
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'use-toml-instead-of-tomli
+                 ;; Using toml instead of tomli eases bootstrapping.
+                 (lambda _
+                   (substitute* "pyproject.toml"
+                     (("\"tomli.*")
+                      "\"toml\","))))
+               (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)))))))
+    (native-inputs (list python-flit-core-bootstrap python-pypa-build-bootstrap))
+    ;; XXX: python-wheel isn't needed but replicate the pep517 package or else
+    ;; fix packages which will then need python-whell as an input.
+    (propagated-inputs (list python-toml python-wheel))
+    (home-page "https://pyproject-hooks.readthedocs.io")
+    (synopsis "Wrappers to call pyproject.toml-based build backend hooks")
+    (description "This is a low-level library for calling build-backends in
+@code{pyproject.toml}-based project.  It provides the basic functionality to
+help write tooling that generates distribution files from Python projects.")
+    (license license:expat)))
+
 (define-public python-pyparsing
   (package
     (name "python-pyparsing")
--
2.39.2






  parent reply	other threads:[~2023-04-28  5:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  5:44 [bug#63139] [PATCH python 00/20] Updates for pyproject-build-system, poetry, python-yubikey-manager John Kehayias via Guix-patches via
2023-04-28  5:49 ` [bug#63139] [PATCH python 01/20] gnu: Add python-installer John Kehayias via Guix-patches via
2023-04-28  5:50 ` John Kehayias via Guix-patches via [this message]
2023-05-01  6:58   ` [bug#63139] [PATCH python 02/20] gnu: Add python-pyproject-hooks Lars-Dominik Braun
2023-05-04 22:04     ` John Kehayias via Guix-patches via
2023-05-08  8:44       ` Lars-Dominik Braun
2023-05-25  3:23         ` John Kehayias via Guix-patches via
2023-05-25 17:53           ` Lars-Dominik Braun
2023-04-28  5:50 ` [bug#63139] [PATCH python 03/20] gnu: Add python-rapidfuzz John Kehayias via Guix-patches via
2023-04-28  5:50 ` [bug#63139] [PATCH python 04/20] gnu: python-crashtest: Update to 0.4.1 John Kehayias via Guix-patches via
2023-04-28  5:50 ` [bug#63139] [PATCH python 05/20] gnu: python-cleo: Update to 2.0.1 John Kehayias via Guix-patches via
2023-04-28  5:50 ` [bug#63139] [PATCH python 06/20] gnu: Add python-deepdiff John Kehayias via Guix-patches via
2023-04-28  5:50 ` [bug#63139] [PATCH python 07/20] gnu: python-platformdirs: Update to 3.2.0 John Kehayias via Guix-patches via
2023-04-28  5:50 ` [bug#63139] [PATCH python 08/20] gnu: python-filelock: Update to 3.12.0 John Kehayias via Guix-patches via
2023-04-28  5:50 ` [bug#63139] [PATCH python 09/20] gnu: python-distlib: Update to 0.3.6 John Kehayias via Guix-patches via
2023-04-28  5:50 ` [bug#63139] [PATCH python 10/20] gnu: python-virtualenv: Update to 20.22.0 John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 11/20] gnu: python-pkginfo: Update to 1.9.6 John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 12/20] gnu: python-jsonschema: Update to 4.17.3 John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 13/20] gnu: python-dulwich: Update to 0.21.3 John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 14/20] gnu: Update python-pypa-build to 1.0.0 John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 15/20] gnu: poetry: Fix build John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 16/20] gnu: Add python-poetry-plugin-export John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 17/20] gnu: python-pyscard: Update to 2.0.7 John Kehayias via Guix-patches via
2023-04-28  5:51 ` [bug#63139] [PATCH python 18/20] gnu: python-fido2: Update to 1.1.1 and enable tests John Kehayias via Guix-patches via
2023-04-28  5:52 ` [bug#63139] [PATCH python 19/20] gnu: Add python-makefun John Kehayias via Guix-patches via
2023-04-28  5:52 ` [bug#63139] [PATCH python 20/20] gnu: python-yubikey-manager: Update to 5.1.0 and enable tests John Kehayias via Guix-patches via
2023-06-22  7:06 ` [bug#63139] poetry not building Reza Housseini
2024-02-02 20:43 ` [bug#63139] [PATCH python 00/20] Updates for pyproject-build-system, poetry, python-yubikey-manager Sharlatan Hellseher
2024-02-14 18:41 ` John Kehayias via Guix-patches via
2024-02-16 12:44   ` Lars-Dominik Braun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76a7207a210365b23c078895f444109e240d2c7f.1682660104.git.john.kehayias@protonmail.com \
    --to=guix-patches@gnu.org \
    --cc=63139@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).