From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id oFazN+fym2VPywAAkFu2QA (envelope-from ) for ; Mon, 08 Jan 2024 14:04:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id GDxqMufym2VofQAAe85BDQ (envelope-from ) for ; Mon, 08 Jan 2024 14:04:39 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=cock.li header.s=mail header.b=IHog+3Jl; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704719079; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VDDeWa0mNq7pSSKJWvN8uNtFwwcL+JrHu6e8iARGzvM=; b=Lv0ha7fgBUyy91ZNkLo2Wyq0xs/JafPMnb5U76++vcTIwRcsezLxiWAgLIkMm/w/gqzhAZ JiyePHBjTsxTMaHuNgm2wnLZdE8rJ1uSTf0xn2gkS08tiQ0sX79KwrfMZpIhpPIVNcntcz s3iblwSNLz6XQJ8GXxQAWaea7zvkQaKikp+a0xni4lYz59lwegS+aXbsUZ/cmniuAzDX1p 98wsZdXpVNXnLdQAxf/cKpfQKnfB5oS6eYjJ4fIzfI0MWZFTJ/h0DcrCwVE/dRNz2q2ebW v8iItAAxoidSfyPjmbsF9r37PbBbxOInjNfeFGFIsKHiZMLdT8FtHedrvBztMw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704719079; a=rsa-sha256; cv=none; b=aKrYxg6oyUb39mdtyIOJNMWbsktOYh5dza91Dalu6Wp2twtCt505q0n2/mBlFR9eW3GcM9 1czNwW2dK0ak1TmYuUOCJRwJZS9I6BcofXqegSlJkg0EgIcyjQAxJLChP1f52Unrp4Zcvw MKHwUDFVti/j2WKPl41fcNIBGhpqybP/whWDlK9wm43TF6XDWsY9j+ScYuiXL3Rgfpc093 7yYM41aA25RJunngahnIJd/b3ddaZXlYHyTtQJ7pePHTasndvv2G5sD8P8CXvzaug1m6ZZ LdiPXJ1AXRj2xgph6Vcwp0jdoVH4AqsXVHv4U6uPRnMwx1EPrbGmldjwFXWXXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=cock.li header.s=mail header.b=IHog+3Jl; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none 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 1390A34862 for ; Mon, 8 Jan 2024 14:04:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMpIZ-0001PK-GV; Mon, 08 Jan 2024 08:04:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMibp-0007rZ-QR for guix-devel@gnu.org; Mon, 08 Jan 2024 00:55:37 -0500 Received: from mail.cock.li ([37.120.193.123]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMibn-0002ZF-4s for guix-devel@gnu.org; Mon, 08 Jan 2024 00:55:37 -0500 From: Justin Veilleux DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1704693327; bh=VDDeWa0mNq7pSSKJWvN8uNtFwwcL+JrHu6e8iARGzvM=; h=From:To:Subject:Date:From; b=IHog+3JlCQ3FPbiBo7VvIRG566YLdAUAbE7uXdL1t0ayT0cA5zn7uRzTRsiAuw/IS VNE122LG2savxriU7ElB7Rc6EX7pfY9/igackV00CrYAUSQZuoZgSdQvgyElMBy7Js FoAymCZjj9XS20b/UTWBHCov/mZOuB1ywFH6wjjq6TKAQooBkfvW7KsfJ/qI/g3LZk zp5PezSHXoNbndwsNpZaBxva4UnFwe/fCwoCBAj+eYj1lk0nLGS3wMkysLkQX6RgnG fzEUIcluYK509ItmjFJXBinZYzD5i2zf4TJHuNZ4GvxuSeSHYhxlzWdiDlOYXz4Yva rb7QFQEGKQ9rA== To: guix-devel@gnu.org Subject: python importers as an alternative to propagated-inputs Date: Mon, 08 Jan 2024 00:55:25 -0500 Message-ID: <87mstgz7w2.fsf@cock.li> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=37.120.193.123; envelope-from=terramorpha@cock.li; helo=mail.cock.li X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 08 Jan 2024 08:04:03 -0500 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.96 X-Spam-Score: -7.96 X-Migadu-Queue-Id: 1390A34862 X-Migadu-Scanner: mx12.migadu.com X-TUID: 9J/y4gi8RftJ Hi everyone. I was thinking about the propagated-inputs field in package definitions. As I understand it, it is useful as a way to replace RPATHs in packages that aren't compiled or don't support them. I was reading the documentation on https://docs.python.org/3/reference/import.html. It looks like we can define custom objects to do module resolution, possibly bypassing PYTHON_PATH lookup. I think it would be possible to write a very simple importer object that looks up module paths from an environment variable that looks like this: PYTHON_GUIX_MODULE_PATH=numpy=/gnu/store/...,pandas=/gnu/store/... This would make propagated-inputs for python libraries and programs unnecessary. Does someone know if this has been tried before? What potential problems would I encounter if I tried to implement this? Cheers.