From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: PYTHONPATH issue explanation Date: Sun, 18 Mar 2018 08:57:31 +0800 Message-ID: <87fu4yurno.fsf@member.fsf.org> References: <87371tqbyb.fsf@elephly.net> <20180223165953.GA6088@thebird.nl> <40dc2378-a039-fec8-55cd-23911f1642ab@crazy-compilers.com> <87lgerwk9s.fsf@member.fsf.org> <5d65c8d2-e31b-ee1e-2b9a-145913015c7b@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]:33820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exMdz-0000MH-W3 for guix-devel@gnu.org; Sat, 17 Mar 2018 20:57:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exMdv-00012j-JW for guix-devel@gnu.org; Sat, 17 Mar 2018 20:57:52 -0400 Received: from rezeros.cc ([2001:19f0:7001:2f3e:5400:ff:fe84:e55d]:41380) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1exMdv-0000zT-3Q for guix-devel@gnu.org; Sat, 17 Mar 2018 20:57:47 -0400 In-Reply-To: <5d65c8d2-e31b-ee1e-2b9a-145913015c7b@crazy-compilers.com> (Hartmut Goebel's message of "Sat, 17 Mar 2018 23:04:26 +0100") 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, > > I agree with Ricardo: We first should agree on what we want to > implement. Okay. > > I created a pad at [1] for collecting all test-cases and the expected > results. Please add you test-cases there. Thanks! > > [1] https://semestriel.framapad.org/p/guix-python-site-packages-test-cases I have append some text, it's available to all in realtime? not sure how it works... > > Am 17.03.2018 um 02:41 schrieb =E5=AE=8B=E6=96=87=E6=AD=A6: > >> - "GUIX_PYTHON_X_Y_SITE_PACKAGES" [=E2=80=A6] is necessary for the "buil= d" environment. > For the build environment we could easily work around using PYTHONPATH. > Since the build-system is clearly defined and does not interfere with > any user-definitions, this is save to do. Yes, but if "GUIX_PYTHON_X_Y_SITE_PACKAGES" does works (i hope so) in the "profile" side, it's better to replace PYTHONPATH for consistent. > >> - Avoid any environment variable for the "profile" environment. >> >> We have a union "profile" for all the python packages, so environment >> variables can be totally avoided with the help of "venv". > [=E2=80=A6] >> We only need to make the "profile" >> a "venv" for python. For python3, a simple "pyvenv.cfg" file is >> enough, for python2 I guess we have to make a union or copy files like >> what "virtualenv" does. > > This would be a very elegant solution. Unfortunately this does not work > as shown in part 2 of my analysis, esp. point 4a. A workaround for the broke case maybe tell the user to create a "sitecustomize.py" in the created venv, and add the search paths of profile himself. I'd like do more tests with the GUIX_PYTHON_X_Y_SITE_PACKAGES option (patch sent), hope it works :-)