From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SJe8LEIKxV8QcAAA0tVLHw (envelope-from ) for ; Mon, 30 Nov 2020 15:05:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aGuVKEIKxV+9QwAAbx9fmQ (envelope-from ) for ; Mon, 30 Nov 2020 15:05:38 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B7C1294038E for ; Mon, 30 Nov 2020 15:05:37 +0000 (UTC) Received: from localhost ([::1]:51354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjkkC-0006EN-HK for larch@yhetil.org; Mon, 30 Nov 2020 10:05:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjkje-0006Bg-Rs for help-guix@gnu.org; Mon, 30 Nov 2020 10:05:02 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:34484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjkjc-0003kz-Dz for help-guix@gnu.org; Mon, 30 Nov 2020 10:05:02 -0500 Received: by mail-wr1-x435.google.com with SMTP id k14so16659374wrn.1 for ; Mon, 30 Nov 2020 07:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beadling-co-uk.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:subject:in-reply-to:date:message-id :mime-version:content-transfer-encoding; bh=OzKwndMQuz1AW+WosKDJi9yPv0moaR0G5MraZGpre5U=; b=Nr6A2ohQWf8T+7y9iCMVWEFlTeYq3j7xZE4252abGJAaQhFTcVXx1vt1uBmCFrNzWG iyy2YHhgEjfbhgetZeZu7e6lOSIrusQ7/fnhMYMGF3Rp8wfUX6Fn+0FvycsaHM2sYmIh 4bFCUVWIDcRsZNvDpiw5ifeR8wV8hsdn/XMMFywSN9QEvldfnUKYBDXJz1M9b2rmw9Mn vK0xPErOgPGaVtqrcl1md5bnAI14CtAk0SXG8qC60X/UnzyTbE4ztSMO/vO0J7fX5oIg FzIRqD/dPrcJqmT6XZGLaEldvV9zpiKug0bFOYNmcjSFUV8rPa1d2j/jqkYZuX78HD+u BPSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=OzKwndMQuz1AW+WosKDJi9yPv0moaR0G5MraZGpre5U=; b=lk/W23B20djQvzWAtmzQ9scl1oflDEf8JtU0+zP/rUZ8uubGEG5JYZLnend6UB8BsI nlmndceV7X7211xMmzGCZ6OPMYy/qgUEbeSL4AkLXPY+OP5scKeohUglf/8Ay44Gh91/ bqLu5Z25IYN9GAS0ExeQ94KQF/5fbT67yMP5y4f5I7DP8DSApDBqZSFpWSNdKg22boOu 8mEzMAILn+K643ayrmGykVfe8YSBBMWosAdFyLQLzJnlhAr4y0vddw9xXsD4/EMPRH/S xPBMUm+hQYIxX4/xF+875ds8+iBhpaQiiwO5ECkuZ3QZ1UlLUys1tRjEvTxG2FdXURdS l5cw== X-Gm-Message-State: AOAM533pTlfp/NClKfRRhNvf8VZQoN0htec91f0wZvKiVvx2EIcrHDHs 5a0kjA9wY15Oa8dZwLRqpzWzRUt48MN3OK1DO8o= X-Google-Smtp-Source: ABdhPJy3EOBcGMHjtmpqjLiNqE1QetnRLuMdDHEDNvTOZ2ckEmUPMEOeaBhtrviCN1Nc7mvhgy0wIw== X-Received: by 2002:a5d:4585:: with SMTP id p5mr28640866wrq.65.1606748697687; Mon, 30 Nov 2020 07:04:57 -0800 (PST) Received: from phil-XPS-13-9360 (88-111-129-212.dynamic.dsl.as9105.com. [88.111.129.212]) by smtp.gmail.com with ESMTPSA id g11sm29288848wrq.7.2020.11.30.07.04.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Nov 2020 07:04:56 -0800 (PST) References: <85360rr8v5.fsf@beadling.co.uk> <86pn3vvvt5.fsf@gmail.com> User-agent: mu4e 1.2.0; emacs 26.3 From: Phil To: zimoun , help-guix@gnu.org Subject: Re: Avoiding PYTHONPATH - latest? In-reply-to: <86pn3vvvt5.fsf@gmail.com> Date: Mon, 30 Nov 2020 15:04:56 +0000 Message-ID: <85zh2yq413.fsf@beadling.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=2a00:1450:4864:20::435; envelope-from=phil@beadling.co.uk; helo=mail-wr1-x435.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.48 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=beadling-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=Nr6A2ohQ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: B7C1294038E X-Spam-Score: -1.48 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: lAfyPitZeTDh Hi zimoun writes: > Just to understand, is your point to be able to mix both =E2=80=9Cpip ins= tall=E2=80=9C > and =E2=80=9Cguix install=E2=80=9D? If yes, it appears to me a bad idea,= choose one or > the other. I suppose my point is - system-level use of PYTHONPATH is ill-advised, beca= use it's prescribed use in Python is for user-level sys.path modifications. An example of when this causes surprise is creating an environment using 'pip install -e .' will not give a pure environment if PYTHONPATH is set. I 100% agree it's a bad idea to mix packagers, but pip install's use-cases = go beyond the need to do fixed installs of package@version, provided by Guix. The use of 'pip install -e .' to create a development environment is widely (but not exclusively) used in the python community, and integrates nicely with many python tools (eg pytest). It's not essential of course. Given that Guix profile's can't be edited from within a Guix profile (for obvious reasons), if I want to edit my code whilst it is installed, I see the only way to do this is by having a virtual env on top of a Guix profile that contains only my own module - with the Guix profile holding Python and all the imports I depend on. It's not pretty. So much so that I'm considering if I can live without '-e', but the workarounds of using sys.append, PYTHONPATH, or even pth files are, at least in some people's minds, not as clean. If anyone has worked-out a better setup with Guix/Python, I'm keen to get advice (hence me floating the (half-baked) idea of using pyvenv.cfg to create Guix profiles). There's a 2 year long discussion on a similar topic for the Poetry package (which also aims to replace pip, for different reasons than Guix): https://github.com/python-poetry/poetry/issues/34 Things get a bit heated, which isn't helpful, but it does illustrate how dearly some python fans take their ability to use pip's developer setup - I'm more pragmatic and looking for workable solutions, preferably without= =20 fighting Python stock features just to keep Guix happy ;-) Perhaps the simple answer here is never mix pip and guix, and setup your development environment so there is never a requirement on pip. But this is a limitation to people used to working this way. If nothing else, personally, it was a good off-the-deep-end way to get unde= r the covers of Guix's treatment of python and python packages :-)