[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#46028] [PATCH core-updates 0/2] Farewell to PYTHONPATH.
From: |
Maxim Cournoyer |
Subject: |
[bug#46028] [PATCH core-updates 0/2] Farewell to PYTHONPATH. |
Date: |
Fri, 29 Jan 2021 12:12:47 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> Using PYTHONPATH as a mean to discover the Python packages had the following
>> issues:
>>
>> 1. It is not versioned, so different versions of Python would clash
>> if
>> installed in a shared profile.
>>
>> 2. It would interfere with the host Python site on foreign
>> distributions, sometimes preventing a a user to login their GDM
>> session (!).
>>
>> 3. It would take precedence over user installed Python packages
>> installed through pip.
>>
>> 4. It would leak into Python virtualenvs, which are supposed to
>> create
>> isolated Python environments.
>
> I've adapted the most problematic uses of PYTHONPATH in the code base
> (mostly (getenv "PYTHONPATH"), which would typically now return #f and
> pushed the branch to cu/farewell-to-pythonpath (it contains ~160
> commits, so I thought it'd be easier to review as a branch).
There's now a third version of this that I pushed to the
cu/farewell-to-pythonpath branch. It now uses GUIX_PYTHONPATH instead
of GUIX_PYTHONPATH_X_Y, which makes it easier to use in any package
definition (as there's no longer a need to import the (guix build
python-build-system) module for packages not using the Python build
system).
I'll merge it soon if nobody has an objection.
Thanks,
Maxim