From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Hinsen Subject: Re: Down with PYTHONPATH! Date: Sat, 15 Jun 2019 11:15:56 +0200 Message-ID: References: <87muikr3bq.fsf@mdc-berlin.de> 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]:58839) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hc4n9-0005CU-Dw for guix-devel@gnu.org; Sat, 15 Jun 2019 05:16:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hc4n8-0007w4-0Y for guix-devel@gnu.org; Sat, 15 Jun 2019 05:16:06 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:36077) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hc4n7-0007ok-K8 for guix-devel@gnu.org; Sat, 15 Jun 2019 05:16:05 -0400 In-Reply-To: <87muikr3bq.fsf@mdc-berlin.de> 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 , guix-devel@gnu.org Hi Ricardo, > here=E2=80=99s a half-baked idea that I think is worth considering: let= =E2=80=99s patch > our Python package to respect GUIX_PYTHONPATH and use GUIX_PYTHONPATH in > our wrappers. ... I agree with the reasoning behind this and at first sight, your proposal looks good. But real life is always messier than anybody's theory, so this needs to be stress-tested before general deployment, in my opinion. > PYTHONPATH is the wrong mechanism for Guix to use. We have previously True, but it's also the wrong mechanism for just about everything else. The kind of idea that was reasonable in 1990 but didn't scale to more complex environments. Nowadays, in the wider world (beyond Guix), PYTHONPATH is mainly a newbie trap. Experienced pythonistas have abandoned it for virtual environments. So if it can be turned into a mechanism for supporting Guix environments with a name change, I doubt anyone would complain about standard PYTHONPATH being gone. > If we=E2=80=99re feeling lucky we could even introduce GUIX_PYTHON2_PATH = and > GUIX_PYTHON3_PATH to solve the other half of the problem, namely that > Python 2 applications will load Python 3 libraries (and vice versa). Definitely. It solves one more problem at no extra cost. Konrad.