[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Down with PYTHONPATH!

From: Hartmut Goebel
Subject: Re: Down with PYTHONPATH!
Date: Tue, 18 Jun 2019 10:28:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

Am 17.06.19 um 20:34 schrieb Ricardo Wurmus:
> Yes, those solutions aren’t 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.


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.

Hartmut Goebel

| Hartmut Goebel          | address@hidden               |
| | compilers which you thought are impossible |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]