From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SDL5Nr6W6mAxYQEAgWs5BA (envelope-from ) for ; Sun, 11 Jul 2021 08:59:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IC2PMr6W6mDEcgAAB5/wlQ (envelope-from ) for ; Sun, 11 Jul 2021 06:59:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 325CE251D3 for ; Sun, 11 Jul 2021 08:59:10 +0200 (CEST) Received: from localhost ([::1]:56574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2TQi-0002g0-UO for larch@yhetil.org; Sun, 11 Jul 2021 02:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2TQb-0002fd-VZ for guix-patches@gnu.org; Sun, 11 Jul 2021 02:59:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2TQb-00020B-OA for guix-patches@gnu.org; Sun, 11 Jul 2021 02:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2TQb-0005po-IZ for guix-patches@gnu.org; Sun, 11 Jul 2021 02:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49329] [PATCH 00/??] Improve Ren'py package Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Jul 2021 06:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49329 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Chris Marusich Cc: 49329@debbugs.gnu.org Received: via spool by 49329-submit@debbugs.gnu.org id=B49329.162598673922418 (code B ref 49329); Sun, 11 Jul 2021 06:59:01 +0000 Received: (at 49329) by debbugs.gnu.org; 11 Jul 2021 06:58:59 +0000 Received: from localhost ([127.0.0.1]:33783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2TQY-0005pW-Kq for submit@debbugs.gnu.org; Sun, 11 Jul 2021 02:58:58 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:29807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2TQW-0005pN-Gc for 49329@debbugs.gnu.org; Sun, 11 Jul 2021 02:58:57 -0400 Received: from nijino.local (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GMyRd0Lq3z3wWT; Sun, 11 Jul 2021 08:58:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1625986733; bh=CDwGDakN+flB5gbA4V3Kiu32+tRbIqJQ/VOM/xys8VY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ZXvEn1f+6Q4ZpsRadzFlBOF1rYh0UXCVm632Q/REo1fxDxq4zfjnZhs/8tVX0by05 6mzwtO6OTIfMe7PE3wqbqTn0sdsZ2lWS/XY7E9TqngL712DATy+DJ7NlpX/EDVoP3n VIKthJTBZ1UVz/zLWlC7t9L0Kd8aksLpzyyRLbNk= Message-ID: <235456dfa9f27b6a3b612fb0a8d6e86aa4b5d362.camel@student.tugraz.at> From: Leo Prikler Date: Sun, 11 Jul 2021 08:58:51 +0200 In-Reply-To: <8735sl5uu8.fsf_-_@gmail.com> References: <20210703092842.32189-1-leo.prikler@student.tugraz.at> <20210703092842.32189-4-leo.prikler@student.tugraz.at> <8735sl5uu8.fsf_-_@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625986750; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=CDwGDakN+flB5gbA4V3Kiu32+tRbIqJQ/VOM/xys8VY=; b=jN9okkN9fR9neJAZIeKWOK1ogJp+In72OYt4jpZbwICXhZQs1n1blxRTIFTqCC/xXxw399 xuECsh8jMsR4aYjGaDbOJzmVBrBSqOfYuYUTstXAXuhOsK8w8IbMxrh1DL6Y3NeA2fj3ga r26un2q9vudoD7SaT7CiXUkql3joiara1ax26jx+wAGtOgmp6KZcZ8h2XYmGDdRocTGrCC F9za+LSLAbEHHeELLloa+RkAIEi5GEgPqQYAy0KzOIVi1xBr8ts+zrhs+cHmlkaqskmoC6 ptJoud/AU4q/MH6U7YoSDZFNPZNy8cNNdHx8beopffPGQex5raiv4Xrr5BmAXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625986750; a=rsa-sha256; cv=none; b=ho3YifRi/lin7LAmC4vAUoO1i3BhSywVCZPKnx3JWmBP21fFddQeN3Ur1eXERUFmz2YRjr pGi8y83S6IJpaip++0QTdN6W9byTIGZV3XqIQXEZF3RjQUNFfZ6KP7WuMYqAAuXLtzCEfr 3N0D+as922cW3MxeadhwtwpUVzIIuM5evunEgrmqC0WZRas1mbcK/Aq4cEMxnzYvi4c1/P xiZ/EbcDs7kBL0tbYbf8IimaG9Z82Y1W8YtLb3Adzf1lZTJ8wh8xAgpFL8XDE72asaAE95 roUJLuQmxcs8OuvnwPJ4r4EkONqjV/ypdiiDoeNlA3ZB9zSb+uGfrhuc/5nx9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=ZXvEn1f+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=ZXvEn1f+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 325CE251D3 X-Spam-Score: 0.20 X-Migadu-Scanner: scn1.migadu.com X-TUID: x4T7ri3De59N Am Samstag, den 10.07.2021, 21:37 -0700 schrieb Chris Marusich: > Leo Prikler writes: > > > diff --git a/gnu/packages/game-development.scm b/gnu/packages/game- > > development.scm > > [...] > > #t)) > > (replace 'wrap > > (lambda* (#:key inputs outputs #:allow-other-keys) > > - (wrap-program (string-append (assoc-ref outputs > > "out") > > - "/bin/renpy") > > - `("PYTHONPATH" = (,(getenv "PYTHONPATH")))) > > - #t))))) > > + (let ((out (assoc-ref outputs "out")) > > + (site (string-append "/lib/python" > > + (python-version > > + (assoc-ref inputs > > "python")) > > + "/site-packages"))) > > + (wrap-program (string-append out "/bin/renpy") > > + `("PYTHONPATH" = > > + (,@(delete-duplicates > > + (map > > + (lambda (store-path) > > + (string-append store-path site)) > > + (cons (assoc-ref outputs "out") > > + (map cdr > > + (filter > > + (lambda (input) > > + (string-prefix? "python2" > > (car input))) > > + inputs)))))))) > > + #t)))))) > > What's the motivation for doing this? It seems like the new version > deletes duplicates, but has the downside of being a little more > complicated and relying on the package names to determine what goes > into > the PYTHONPATH. > > Duplicate entries in the PYTHONPATH should not be a problem for > correctness or performance, right? I feel like this section was > perhaps > better the way it was originally. Am I missing something? The reason is that I want to avoid having native-inputs in PYTHONPATH (which the naïve getenv-based solution will always return). For native builds these currently can't be avoided even with the above snippet, but for cross-builds and maybe future native-builds which separate inputs and native-inputs, this ought to do "the correct thing". delete-duplicates is more of a style thing than anything else, in my personal opinion the wrapper script is more readable with it. Regards, Leo