Subject: [bug#46848] [PATCHES] [core-updates] PEP 517 python-build-system

From: Lars-Dominik Braun <[email-masked]>
Date: Sun, 24 Apr 2022 11:22:12 +0200

Hey again,

sorry for the noise. During one of my many rebases I missed to add a
file that should have been included in patch 3. See attached patch.

Cheers,
Lars

>From 6bb5578a47f795f54456d2f7e3c6949f5e0b3e13 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <[email-masked]>
Date: Sun, 24 Apr 2022 11:18:37 +0200
Subject: [PATCH v3 151/151] dirty: squash: Add missing file.

---
 gnu/packages/python-commencement.scm | 129 +++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100644 gnu/packages/python-commencement.scm

diff --git a/gnu/packages/python-commencement.scm b/gnu/packages/python-commencement.scm
new file mode 100644
index 0000000000..e0959c6e79
--- /dev/null
+++ b/gnu/packages/python-commencement.scm
@@ -0,0 +1,129 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2014 Andreas Enge <[email-masked]>
+;;; Copyright © 2012 Nikita Karetnikov <[email-masked]>
+;;; Copyright © 2014, 2015, 2017 Mark H Weaver <[email-masked]>
+;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <[email-masked]>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <[email-masked]>
+;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <[email-masked]>
+;;; Copyright © 2019, 2020 Marius Bakke <[email-masked]>
+;;; Copyright © 2020 Timothy Sample <[email-masked]>
+;;; Copyright © 2020 Guy Fleury Iteriteka <[email-masked]>
+;;; Copyright © 2021 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2021 Lars-Dominik Braun <[email-masked]>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages python-commencement)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module (guix build-system trivial)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-xyz)
+  #: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
+     '(#:modules ((guix build union))
+       #:builder (begin
+                   (use-modules (ice-9 match)
+                                (srfi srfi-1)
+                                (srfi srfi-26)
+                                (guix build union))
+
+                   (let ((out (assoc-ref %outputs "out")))
+                     (union-build out (filter-map (match-lambda
+                                                ((_ . directory) directory))
+                                              %build-inputs))
+                     #t))))
+    (inputs
+     `(("python" ,python-wrapper)
+       ("python-setuptools" ,python-setuptools)
+       ("python-pip" ,python-pip)))
+    (native-search-paths
+     (package-native-search-paths python))
+    (search-paths
+     (package-search-paths python))
+    (license (package-license python))
+    (synopsis "Python toolchain")
+    (description
+     "Python toolchain including Python itself, setuptools and pip.  Use this
+package if you need a minimal Python toolchain instead of just the
+interpreter.")
+    (home-page (package-home-page python))))
+
+(define-public python2-toolchain
+  (package
+    (name "python2-toolchain")
+    (version (package-version python-2))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments
+     '(#:modules ((guix build union))
+       #:builder (begin
+                   (use-modules (ice-9 match)
+                                (srfi srfi-1)
+                                (srfi srfi-26)
+                                (guix build union))
+
+                   (let ((out (assoc-ref %outputs "out")))
+                     (union-build out (filter-map (match-lambda
+                                                ((_ . directory) directory))
+                                              %build-inputs))
+                     #t))))
+    (inputs
+     `(("python" ,python-2)
+       ("python2-setuptools" ,python2-setuptools)
+       ("python2-pip" ,python2-pip)))
+    (native-search-paths
+     (package-native-search-paths python-2))
+    (search-paths
+     (package-search-paths python-2))
+    (license (package-license python-2))
+    (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-2))))
+
+;; Python 3 toolchain for python-build-system. We cannot use python-toolchain
+;; here, since we’d need to bootstrap python-pip somehow.
+(define-public python-toolchain-for-build
+  (package
+    (inherit python-toolchain)
+    (name "python-toolchain-for-build")
+    (inputs
+      `(("python" ,python-wrapper)
+        ("python-setuptools" ,python-setuptools)))))
+
+(define-public python2-toolchain-for-build
+  (package
+    (inherit python2-toolchain)
+    (name "python2-toolchain-for-build")
+    (inputs
+      `(("python" ,python-2)
+        ("python2-setuptools" ,python2-setuptools)))))
+
-- 
2.35.1