From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: PYTHONPATH - let's systematically tame the baest Date: Tue, 17 Apr 2018 09:47:12 +0800 Message-ID: <87po2ya9jz.fsf@member.fsf.org> References: <87371tqbyb.fsf@elephly.net> <20180223165953.GA6088@thebird.nl> <2c8e59df-d0f7-e096-f175-a8a74e8818dc@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8FiQ-0001jB-3E for guix-devel@gnu.org; Mon, 16 Apr 2018 21:47:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8FiM-0006ZP-3z for guix-devel@gnu.org; Mon, 16 Apr 2018 21:47:26 -0400 Received: from rezeros.cc ([2001:19f0:7001:2f3e:5400:ff:fe84:e55d]:43082) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f8FiL-0006TT-Kg for guix-devel@gnu.org; Mon, 16 Apr 2018 21:47:22 -0400 In-Reply-To: <2c8e59df-d0f7-e096-f175-a8a74e8818dc@crazy-compilers.com> (Hartmut Goebel's message of "Mon, 16 Apr 2018 16:21:00 +0200") 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel@gnu.org Hartmut Goebel writes: > Hi, Hello! > > let's pick up on this issue and systematically design the test-cases to > benchmark the proposed solutions. I already prepared a test-script to > simplify this and will provide a full description as later. > > **Please comment if any relevant case is missing or if any case can be > skipped** > > 1) Test-cases > > For all environments (see below) these cases must give the expected > output - which is defined by what a "foreign distribution's" python > would do: > - "installed" python > - venv with and without --system-site-packages > - stacked venv with and without --system-site-packages We should consider both python2 and python3, and virtual environments created by the 'virtualenv' package. > > 2) Environments to be tested. > > The proposed solution must pass the test-suite in all of these environmen= ts: > > 2.1 guix environment: > > =C2=A0=C2=A0=C2=A0=C2=A0 guix environment --ad-hoc python -- python3 test= it > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --> Expected outcome: site-packages from G= UIX_ENVIRONEMENT > > 2.2 guix environment with container: > > =C2=A0=C2=A0=C2=A0=C2=A0 guix environment -C --ad-hoc python -- python3 t= estit > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --> Expected outcome: site-packages from G= UIX_ENVIRONEMENT > > 2.3 Installed package *without setting the environment variables!* > > =C2=A0=C2=A0=C2=A0=C2=A0 guix package -i python && ~/.guix-profile/bin/py= thon3 testit > =C2=A0=C2=A0=C2=A0 --> Expected outcome: site-packages from ~/.guix-profi= le/ > =C2=A0=C2=A0=C2=A0 --> Shall this work, too? Is it nice-to-have or useles= s? Yeah, it's nice to have (to avoid introducing an environment variable), but not necessary. > > 2.4 running from /gnu/store (directly) > > =C2=A0 =C2=A0 $(readlink -f ~/.guix-profile/bin/python3) testit > =C2=A0=C2=A0=C2=A0 --> Expected outcome: site-packages from /gnu/store > =C2=A0 =C2=A0 --> What is the expected outcome? What is the expected I think if we use environment variable to specify all the site-packages, it should be the same as running from profile. It maybe different if we resolve site-packages by the executable location... > > 2.5 running from /gnu/store (via link) > > =C2=A0 =C2=A0 ln -s $(readlink -f ~/.guix-profile/bin/python3) > /tmp/test-guix-pythonA.exe ; > =C2=A0=C2=A0=C2=A0 /tmp/test-guix-pythonA.exe testit > =C2=A0=C2=A0=C2=A0 --> Expected outcome: site-packages from /gnu/store True when we're not use the environment variable. > > 2.6 Installed in GuixSD > > =C2=A0=C2=A0=C2=A0 --> Do we need to test this? Or is this already covere= d by one of > the other cases? For this, there is nothing special about GuixSD. Had you review my 'GUIX_PYTHON_X_Y_SITE_PACKAGES' patch? I think it's enough to support both python2 and python3 in the same profile: http://lists.gnu.org/archive/html/guix-devel/2018-03/msg00238.html Thanks!