From unknown Wed Jun 18 23:05:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40469 <40469@debbugs.gnu.org> To: bug#40469 <40469@debbugs.gnu.org> Subject: Status: [PATCH core-updates] build-system/python: Add a #:python-output argument. Reply-To: bug#40469 <40469@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:05:36 +0000 retitle 40469 [PATCH core-updates] build-system/python: Add a #:python-outp= ut argument. reassign 40469 guix-patches submitter 40469 Jakub K=C4=85dzio=C5=82ka severity 40469 normal tag 40469 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 06 10:48:18 2020 Received: (at submit) by debbugs.gnu.org; 6 Apr 2020 14:48:19 +0000 Received: from localhost ([127.0.0.1]:49027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLT2w-00029Y-JV for submit@debbugs.gnu.org; Mon, 06 Apr 2020 10:48:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:46056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLT2u-00029L-1n for submit@debbugs.gnu.org; Mon, 06 Apr 2020 10:48:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35384) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLT2s-0000Ca-J2 for guix-patches@gnu.org; Mon, 06 Apr 2020 10:48:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLT2r-0004qD-8E for guix-patches@gnu.org; Mon, 06 Apr 2020 10:48:14 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:40146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jLT2q-0004pI-U7 for guix-patches@gnu.org; Mon, 06 Apr 2020 10:48:13 -0400 Received: (qmail 26110 invoked by uid 1009); 6 Apr 2020 16:48:11 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25773. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.00877 secs); 06 Apr 2020 14:48:11 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 6 Apr 2020 16:48:10 +0200 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: guix-patches@gnu.org Subject: [PATCH core-updates] build-system/python: Add a #:python-output argument. Date: Mon, 6 Apr 2020 16:48:09 +0200 Message-Id: <20200406144809.30928-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 37.59.186.212 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit Cc: leo@famulari.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This simplifies packages that ship Python bindings in a separate output. * guix/build-system/python.scm (python-build): Add the argument, pass it build-side. * guix/build/python-build-system.scm (site-packages): Add an #:output argument. (add-installed-pythonpath): Likewise. (install): Use the #:python-output argument. (wrap): Likewise. (rename-pth-file): Likewise. Use the site-packages procedure. --- See #40267 for an example of what this change wants to accomplish. guix/build-system/python.scm | 2 ++ guix/build/python-build-system.scm | 27 ++++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index e39c06528e..34cc487c8c 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -170,6 +170,7 @@ pre-defined variants." (phases '(@ (guix build python-build-system) %standard-phases)) (outputs '("out")) + (python-output "out") (search-paths '()) (system (%current-system)) (guile #f) @@ -196,6 +197,7 @@ provides a 'setup.py' file as its build system." #:use-setuptools? ,use-setuptools? #:phases ,phases #:outputs %outputs + #:python-output ,python-output #:search-paths ',(map search-path-specification->sexp search-paths) #:inputs %build-inputs))) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 09bd8465c8..3b19072264 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -154,28 +154,29 @@ (major+minor (take components 2))) (string-join major+minor "."))) -(define (site-packages inputs outputs) +(define* (site-packages inputs outputs #:key (output "out")) "Return the path of the current output's Python site-package." - (let* ((out (assoc-ref outputs "out")) + (let* ((out (assoc-ref outputs output)) (python (assoc-ref inputs "python"))) (string-append out "/lib/python" (python-version python) "/site-packages/"))) -(define (add-installed-pythonpath inputs outputs) +(define* (add-installed-pythonpath inputs outputs #:key (output "out")) "Prepend the Python site-package of OUTPUT to PYTHONPATH. This is useful when running checks after installing the package." (let ((old-path (getenv "PYTHONPATH")) - (add-path (site-packages inputs outputs))) + (add-path (site-packages inputs outputs #:output output))) (setenv "PYTHONPATH" (string-append add-path (if old-path (string-append ":" old-path) ""))) #t)) (define* (install #:key outputs (configure-flags '()) use-setuptools? + (python-output "out") #:allow-other-keys) "Install a given Python package." - (let* ((out (assoc-ref outputs "out")) + (let* ((out (assoc-ref outputs python-output)) (params (append (list (string-append "--prefix=" out)) (if use-setuptools? ;; distutils does not accept these flags @@ -186,7 +187,9 @@ when running checks after installing the package." (call-setuppy "install" params use-setuptools?) #t)) -(define* (wrap #:key inputs outputs #:allow-other-keys) +(define* (wrap #:key inputs outputs + (python-output "out") + #:allow-other-keys) (define (list-of-files dir) (find-files dir (lambda (file stat) (and (eq? 'regular (stat:type stat)) @@ -199,7 +202,7 @@ when running checks after installing the package." (string-append dir "/sbin")))) outputs)) - (let* ((out (assoc-ref outputs "out")) + (let* ((out (assoc-ref outputs python-output)) (python (assoc-ref inputs "python")) (var `("PYTHONPATH" prefix ,(cons (string-append out "/lib/python" @@ -214,17 +217,15 @@ when running checks after installing the package." bindirs) #t)) -(define* (rename-pth-file #:key name inputs outputs #:allow-other-keys) +(define* (rename-pth-file #:key name inputs outputs + (python-output "out") + #:allow-other-keys) "Rename easy-install.pth to NAME.pth to avoid conflicts between packages installed with setuptools." ;; Even if the "easy-install.pth" is not longer created, we kept this phase. ;; There still may be packages creating an "easy-install.pth" manually for ;; some good reason. - (let* ((out (assoc-ref outputs "out")) - (python (assoc-ref inputs "python")) - (site-packages (string-append out "/lib/python" - (python-version python) - "/site-packages")) + (let* ((site-packages (site-packages inputs outputs #:output python-output)) (easy-install-pth (string-append site-packages "/easy-install.pth")) (new-pth (string-append site-packages "/" name ".pth"))) (when (file-exists? easy-install-pth) -- 2.26.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 21:32:52 2020 Received: (at 40469) by debbugs.gnu.org; 29 May 2020 01:32:52 +0000 Received: from localhost ([127.0.0.1]:53438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeTtD-0003uF-PC for submit@debbugs.gnu.org; Thu, 28 May 2020 21:32:51 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:34129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeTtB-0003tz-9M for 40469@debbugs.gnu.org; Thu, 28 May 2020 21:32:49 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 3894C90C; Thu, 28 May 2020 21:32:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 28 May 2020 21:32:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=mesmtp; bh=+gIOYh/dLfm48vAzQipbGfBlvexqHSDtt8wNoBVBlUo=; b=pdeHeIRK4VHf OPDiblM0f+LHkKG6/RlrAdPWCZ4jPbooj2P8onoSxOqvS/eCb9S92dA/WaP0rtO6 bAzD0JqANscI+kw6weIYvbmIjqQCrv+qbW59RCkfB0NYdcmk6EbT/bdI1R1vvMZo xzfrYtYeCIJQ0pcMmbWtGEpc5b2h9Wc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=+gIOYh/dLfm48vAzQipbGfBlvexqHSDtt8wNoBVBl Uo=; b=OXSSPtLWXV9qJnE0knyILm1vuHsOsWEjOhTfVSp/jfI/I66WSIVkSb/11 /cNb1gZEi3B5Aa6JDttCDLwRzSkSZin2yOKaAzTQ5WdSpK9GOtIxCduyrkOXPoHe Crcpud4kYPMAQUS2K7YPZmWlKbhw4gXwpRh2SUOSGpeXPepKVIkdA+vhBstBav6+ rJl8NWmtBzl3H4qVVZDDGRjsl+ZsnfRjYUzZk/fVzBWnnFPg6AVIS8WuHQRmFHnM KoKM1az6B/mkq2wpLtcuvEgvL3KAYSzYKZ14EitAq1Y82BJLHJul+k+cKlmcQVhQ crfeK6Gz3Wa2FrAQDokc+AhdOYCEQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvjedggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggugfgjsehtke ertddttdejnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl rghrihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeegjeeggeehtddugfffuddtvdfffe ffjeekffffveffheegvddvuedtffekjeejjeenucfkphepjeeirdduvdegrddufeekrdei feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvg hosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 73D473280059; Thu, 28 May 2020 21:32:42 -0400 (EDT) Date: Thu, 28 May 2020 21:32:40 -0400 From: Leo Famulari To: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= Subject: Re: [PATCH core-updates] build-system/python: Add a #:python-output argument. Message-ID: <20200529013240.GG5443@jasmine.lan> References: <20200406144809.30928-1-kuba@kadziolka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200406144809.30928-1-kuba@kadziolka.net> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40469 Cc: 40469@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Mon, Apr 06, 2020 at 04:48:09PM +0200, Jakub Kądziołka wrote: > This simplifies packages that ship Python bindings in a separate output. > > * guix/build-system/python.scm (python-build): Add the argument, pass it > build-side. > * guix/build/python-build-system.scm (site-packages): Add an #:output > argument. > (add-installed-pythonpath): Likewise. > (install): Use the #:python-output argument. > (wrap): Likewise. > (rename-pth-file): Likewise. Use the site-packages procedure. > --- > > See #40267 for an example of what this change wants to accomplish. Too bad it didn't make it into the recent core-updates cycle. If you are ready to add Unicorn, you could do that on master with a TODO comment about using this feature once it is live. And I think you can push this to the current core-updates along with a commit adjusting Unicorn. If you cherry-picked just this commit to master then it would probably not take *too* long to test. That's what I would do to test it, anyways. Thanks for working on this! From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 20 21:27:59 2020 Received: (at 40469) by debbugs.gnu.org; 21 Jun 2020 01:28:00 +0000 Received: from localhost ([127.0.0.1]:59006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmom7-0004Qh-JU for submit@debbugs.gnu.org; Sat, 20 Jun 2020 21:27:59 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:55902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmom5-0004QS-3N for 40469@debbugs.gnu.org; Sat, 20 Jun 2020 21:27:57 -0400 Received: (qmail 32492 invoked by uid 1009); 21 Jun 2020 03:27:55 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25848. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.016716 secs); 21 Jun 2020 01:27:55 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 21 Jun 2020 03:27:55 +0200 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: 40469@debbugs.gnu.org Subject: [PATCH core-updates v2 2/2] gnu: unicorn: Use python-build-system with grace. Date: Sun, 21 Jun 2020 03:27:49 +0200 Message-Id: <20200621012749.3742-2-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200621012749.3742-1-kuba@kadziolka.net> References: <20200621012749.3742-1-kuba@kadziolka.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40469 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/emulators.scm (unicorn)[arguments]: Remove the install-bindings-to-python-output phase. Adjust output names used in other phases. --- gnu/packages/emulators.scm | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index ab5b662915..0e83d7e82c 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -1700,17 +1700,6 @@ performance, features, and ease of use.") (guix build utils)) #:phases (modify-phases %standard-phases - (add-after 'unpack 'install-bindings-to-python-output - (lambda* (#:key outputs #:allow-other-keys) - ;; python-build-system will build the bindings and install them to - ;; the "out" output, so change the build-internal names of the - ;; outputs. - ;; - ;; TODO: remove this once #40469 lands, through the core-updates - ;; holding zone, on master. - (set-car! (assoc "out" outputs) "lib") - (set-car! (assoc "python" outputs) "out") - #t)) (add-before 'build 'build-library (lambda* (#:key inputs #:allow-other-keys) (invoke "make" @@ -1723,7 +1712,7 @@ performance, features, and ease of use.") "UNICORN_STATIC=no" (string-append "PREFIX=" - (assoc-ref outputs "lib"))))) + (assoc-ref outputs "out"))))) (add-before 'build 'prepare-bindings (lambda* (#:key outputs #:allow-other-keys) (chdir "bindings/python") @@ -1736,7 +1725,7 @@ performance, features, and ease of use.") (("_path_list = \\[.*") (string-append "_path_list = [\"" - (assoc-ref outputs "lib") + (assoc-ref outputs "out") ;; eat the rest of the list "/lib\"] + 0*["))) #t)) @@ -1757,10 +1746,10 @@ performance, features, and ease of use.") (let* ((python-samples (find-files "." "sample_.*")) (c-samples (find-files "../../samples" ".*\\.c")) (python-docdir - (string-append (assoc-ref outputs "out") + (string-append (assoc-ref outputs "python") "/share/doc/unicorn/samples")) (c-docdir - (string-append (assoc-ref outputs "lib") + (string-append (assoc-ref outputs "out") "/share/doc/unicorn/samples"))) (for-each (cut install-file <> c-docdir) c-samples) (for-each (cut install-file <> python-docdir) python-samples) -- 2.26.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 20 21:28:05 2020 Received: (at 40469) by debbugs.gnu.org; 21 Jun 2020 01:28:05 +0000 Received: from localhost ([127.0.0.1]:59009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmom9-0004R9-T7 for submit@debbugs.gnu.org; Sat, 20 Jun 2020 21:28:05 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:55900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmom5-0004QR-3N for 40469@debbugs.gnu.org; Sat, 20 Jun 2020 21:27:59 -0400 Received: (qmail 32483 invoked by uid 1009); 21 Jun 2020 03:27:55 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25848. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.00941 secs); 21 Jun 2020 01:27:55 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 21 Jun 2020 03:27:55 +0200 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: 40469@debbugs.gnu.org Subject: [PATCH core-updates v2 1/2] build-system/python: Install to the python output if present. Date: Sun, 21 Jun 2020 03:27:48 +0200 Message-Id: <20200621012749.3742-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40469 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/build/python-build-system.scm (python-output): New procedure. (site-packages, install): Use python-output to find the output path. (wrap, rename-pth-file): Use site-packages where appropriate. * doc/guix.texi (Build Systems): Mention the new behavior. --- Following a discussion on IRC, I am changing the approach a bit. Also, should this go on core-updates or staging? I'm not sure how to account for all the dependent packages, but just grepping for python-build-system puts this in the staging range. $ rg python-build-system gnu/packages | wc -l 1474 doc/guix.texi | 7 +++++++ guix/build/python-build-system.scm | 24 +++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2268e159a2..7af98d3e00 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6685,6 +6685,13 @@ By default guix calls @code{setup.py} under control of @code{setuptools}, much like @command{pip} does. Some packages are not compatible with setuptools (and pip), thus you can disable this by setting the @code{#:use-setuptools?} parameter to @code{#f}. + +If a @code{"python"} output is available, the package is installed into it +instead of the default @code{"out"} output. This is useful for packages that +include a Python package as only a part of the software, and thus want to +combine the phases of @code{python-build-system} with another build system. +Python bindings are a common usecase. + @end defvr @defvr {Scheme Variable} perl-build-system diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 09bd8465c8..62e7a7b305 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2018 Arun Isaac +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -154,9 +155,14 @@ (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 (assoc-ref outputs "out")) + (let* ((out (python-output outputs)) (python (assoc-ref inputs "python"))) (string-append out "/lib/python" (python-version python) @@ -175,7 +181,7 @@ when running checks after installing the package." (define* (install #:key outputs (configure-flags '()) use-setuptools? #:allow-other-keys) "Install a given Python package." - (let* ((out (assoc-ref outputs "out")) + (let* ((out (python-output outputs)) (params (append (list (string-append "--prefix=" out)) (if use-setuptools? ;; distutils does not accept these flags @@ -199,12 +205,8 @@ when running checks after installing the package." (string-append dir "/sbin")))) outputs)) - (let* ((out (assoc-ref outputs "out")) - (python (assoc-ref inputs "python")) - (var `("PYTHONPATH" prefix - ,(cons (string-append out "/lib/python" - (python-version python) - "/site-packages") + (let* ((var `("PYTHONPATH" prefix + ,(cons (site-packages inputs outputs) (search-path-as-string->list (or (getenv "PYTHONPATH") "")))))) (for-each (lambda (dir) @@ -220,11 +222,7 @@ installed with setuptools." ;; Even if the "easy-install.pth" is not longer created, we kept this phase. ;; There still may be packages creating an "easy-install.pth" manually for ;; some good reason. - (let* ((out (assoc-ref outputs "out")) - (python (assoc-ref inputs "python")) - (site-packages (string-append out "/lib/python" - (python-version python) - "/site-packages")) + (let* ((site-packages (site-packages inputs outputs)) (easy-install-pth (string-append site-packages "/easy-install.pth")) (new-pth (string-append site-packages "/" name ".pth"))) (when (file-exists? easy-install-pth) -- 2.26.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 18 12:17:02 2020 Received: (at 40469-done) by debbugs.gnu.org; 18 Jul 2020 16:17:02 +0000 Received: from localhost ([127.0.0.1]:59238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwpWH-0006Aq-Vx for submit@debbugs.gnu.org; Sat, 18 Jul 2020 12:17:02 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:48304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwpWE-00067G-I8 for 40469-done@debbugs.gnu.org; Sat, 18 Jul 2020 12:17:00 -0400 Received: (qmail 1893 invoked by uid 1009); 18 Jul 2020 18:16:56 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25876. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.048455 secs); 18 Jul 2020 16:16:56 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 18 Jul 2020 18:16:56 +0200 Date: Sat, 18 Jul 2020 18:16:54 +0200 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: 40469-done@debbugs.gnu.org Subject: Re: [PATCH core-updates] build-system/python: Add a #:python-output argument. Message-ID: <20200718161654.p322j7d74lk3gl4g@gravity> References: <20200406144809.30928-1-kuba@kadziolka.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dli2ntas6swvjkgc" Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40469-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --dli2ntas6swvjkgc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Patchstack pushed in commits @ 352e6c8a750c1b995ad8a357caf65eeded7e7774, closing. --dli2ntas6swvjkgc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl8TIHYACgkQ4xWnWEYT FWRTBxAAjVYXFRZrSUFuYtVrwP2U4OlEeefYmR3YFmN95PbZW82Hp13KwEGCJdrU eUiub6/beFHj30gUlFrEcBkLbu7FqB3I0s0E8DfvQqb/UT0rRnVVEKOYNSDuTJgu NWYWI49Ojvm5B2esu2eMpwajUtOwUcHWFcLwRWi2wDb8oJ6iMA5If9CTqxh28YRa xsxj+PYrPmPE9OCGxPVSBk4BFlGnUJYZYqPW9dumVZwr0ll0IL9MHsem4kb2rtI9 WmO+sirJJS4IWgaYvvHkHCWxfQXaxHz8xnGvv0FSWeVcnHJ2MmvY5Wwn0WdAR3hK dhHelG9wRKL3/0T6fDzdDOQCN/scyPy9cM0qexNGEVOPSHYvqKy0kz8OAnzuJuQr IawEryGmV2E9OKm0zc6plhnEveCbNWRj8zFkGpE0W7WK1LOIQ4FQyRDHDrgrLYgz +mvzyTyzXdtGyqEMfj2GQE+PBSdatrqGK8ENF3blELZv13XOL8Pq1/epXaE/2XHW he0BHcPUI8IUyVEiJqMsi62ydbnRCFTTolHMAWx62E2l1RfHBcBPRtAqAst9i+wP 5f0CfEZv/skAOPxS4s8tO87Av2liTwXiJQtgAIEbgpZsZjgTQcOsdgzFdCIufl5/ nYc6XhPJCE1GaKm2gMmE53QbX9/ysGY5fpJlf+uLBCnxqNIliLc= =xphP -----END PGP SIGNATURE----- --dli2ntas6swvjkgc-- From unknown Wed Jun 18 23:05:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 16 Aug 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator