From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJgdW-0002tc-Nb for guix-patches@gnu.org; Sat, 10 Jun 2017 09:41:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJgdS-0006FV-Im for guix-patches@gnu.org; Sat, 10 Jun 2017 09:41:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJgdS-0006FL-B7 for guix-patches@gnu.org; Sat, 10 Jun 2017 09:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJgdS-00044e-4f for guix-patches@gnu.org; Sat, 10 Jun 2017 09:41:02 -0400 Subject: bug#27271: Avoiding =?UTF-8?Q?=E2=80=98propagated-inputs=E2=80=99?= for Python dependencies Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170607092242.20565-1-ludo@gnu.org> <878tl2djh8.fsf@elephly.net> <871sqtpkfo.fsf@gnu.org> <87fuf8nbpv.fsf@fastmail.com> Date: Sat, 10 Jun 2017 15:39:56 +0200 In-Reply-To: <87fuf8nbpv.fsf@fastmail.com> (Marius Bakke's message of "Fri, 09 Jun 2017 22:32:44 +0200") Message-ID: <8737b80xn7.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Marius Bakke Cc: Ricardo Wurmus , Hartmut Goebel , 27271@debbugs.gnu.org Heya, (+Cc: Hartmut.) Marius Bakke skribis: > Ludovic Court=C3=A8s writes: [...] >> Perhaps we could modify =E2=80=98sys.path=E2=80=99 from the top of =E2= =80=98__init__.py=E2=80=99 file to >> get something similar to RUNPATH. I=E2=80=99m not sure if there are any >> downsides or gotchas. Thoughts? > > Python actually has a native mechanism for setting up package-specific > search paths: https://docs.python.org/3/library/site.html > > In short, it looks for a file "package.pth" where additional search > paths can be specified (other sys.path manipulations are allowed too). Looks good at first sight. > I asked Hartmut about this during the python-build-system refactoring, > and the counter-argument was that if package A and B depends on > different versions of package C, odd failures could occur. I'm not > convinced propagation sidesteps this problem, however: > > https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00856.html I think we=E2=80=99re in trouble anyway if multiple versions of a package e= nd up in the dependency graph because that=E2=80=99s not something Python supports (the same is probably true for most languages, with the notable exception of Node.) Perhaps it would be worth making a PoC to see what happens with a small set of packages? (I=E2=80=99m not volunteering though, just trying to tweak others into doing it. :-)) Ludo=E2=80=99.