From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: Re: Down with PYTHONPATH! Date: Tue, 18 Jun 2019 10:28:03 +0200 Message-ID: <0cf6e747-48b5-1606-28a0-02fd4d37086a@crazy-compilers.com> References: <87muikr3bq.fsf@mdc-berlin.de> <8736k837bf.fsf@gnu.org> <871rzsoybq.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39827) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hd9TN-0004yf-AI for guix-devel@gnu.org; Tue, 18 Jun 2019 04:28:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hd9TM-0003BK-7T for guix-devel@gnu.org; Tue, 18 Jun 2019 04:28:09 -0400 In-Reply-To: <871rzsoybq.fsf@elephly.net> Content-Language: en-US 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: Ricardo Wurmus , =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: guix-devel@gnu.org Am 17.06.19 um 20:34 schrieb Ricardo Wurmus: > Yes, those solutions aren=E2=80=99t pretty but they are well understood= and have > no surprising behaviour, which is what I meant. GUIX_PYTHON2/3PATH > would be a boring solution that works just like the others I listed. TL;DR: Got for GUIX_PYTHONPATH_3_7. Sorry, last weekend I did not find the time to pick up my last year's work and prepare a hand-over. Not sure if I will make it this month (given I'll be off some days). So just a quick answer: 1) Using some GUIX_PYTHONPATH is an improvement to the current situation and could be implemented quickly. If this variable is going to be exposed to the user's environment (say: used outside of wrapper scripts), I suggest including the version into the name: e.g. GUIX_PYTHONPATH_3_7. Otherwise one will still get conflicts if one has installed Python 3.5, 3.6 and 3.8 in the same environment. (Yes, this is a common case for developers.) 2a) My plan is to make the python executable aware of its "home" ("installation directory", the profile) without using any environment variable. python already does this (by resolving all symlinks), we just need to adopt this to stop at the profile. This should bea eay to implement, I have a draft ready but need to prepare the hand-over. 2b) Another idea is to change the build-system to leverage virtualenvs for Python scripts/apps/tools. This would not only remove the need for wrappers, but should also solve conflicts if a script requires a different versions of packages than installed in the profile. --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |