all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel@gnu.org
Subject: Re: 03/163: build/python: Add a new guix-pythonpath procedure.
Date: Sat, 13 Mar 2021 19:58:19 -0500	[thread overview]
Message-ID: <87lfaqtutw.fsf@gmail.com> (raw)
In-Reply-To: <3c1b9db7-e849-a863-b6e3-a40c12702389@crazy-compilers.com> (Hartmut Goebel's message of "Sun, 7 Mar 2021 12:13:32 +0100")

Hi Harmut!

Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

> Hi schrieb Maxim,
>> Sorry for the delay.
>
> No problem, I reward this with another delay ;-) (Just kidding ;-)
>
>
>> Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
>>
>>> 2) This does not remove duplicates and does not honor .pth files in
>>> the respective directories - which might still be used. Thus
>>> site.addsitedir() should be called for adding the paths. This also
>>> takes care about duplicates.
>> I confess I didn't pay attention to .pth files, which mostly seemed like
>> legacy cruft to me; are they still used in the context of PEP 517 and
>> modern Python packaging?
>
> I can't tell for sure. (I rinember to have seen a note about .pth still
> being used in some setuptool-tick, but can't find it now.) Anyhow, since
> site.py still supports it, I would prefer to be on the save side and
> support it, to.
>
>> The problem with calling site.addsitedir is
>> that it simply appends to sys.path.  We want to splice in the content of
>> GUIX_PYTHONPATH at a controlled location.
>
> site.addsitedir takes an option second arguments where the paths are
> collected into.
>
>
>>> 4) Since PYTHONPATH is evaluated prior to importing sitecustomize, any
>>> sitecustominze.py in the user's path will overwrite our file, thus
>>> inhibiting our paths to be added. Not sure this is what we want in Guix.
>> I asked guidance on the #python channel on freenode and was recommended
>> to use sitecustomize.py for this purpose; reading the doc here seems to
>> confirm our usage of it is as intended [0]:
>
> IC.
>
>
>>> 6) Please add some more comments to the code explaining the idea.
>> I was under the impression the code was concise enough to forego with
>> verbose explanations; I'd rather keep it this way.
>
> Please add some comments. I had a hard time understanding it - and I was
> not even sure I understood, see my question (1).

I'm spread thin right now, so if you could prepare a patch addressing
the above for me to review, that'd be much appreciated.  Otherwise I'll
get to it, but it won't be before some time.

> Another point, which came into my mind just now: Do virtuall
> environments still work as expected? (With --system-site-packages,
> packages in the profile are available, but venv-packages overwrite.
> Without ----system-site-packages packages in the profile are *not*
> available.)

Yes!  This was the main motivation behind this change.

Thank you,

Maxim


  reply	other threads:[~2021-03-14  0:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210125070022.22870.17321@vcs0.savannah.gnu.org>
     [not found] ` <20210125070114.03C0B20E1C@vcs0.savannah.gnu.org>
2021-01-25 21:46   ` 03/163: build/python: Add a new guix-pythonpath procedure Ludovic Courtès
2021-01-25 22:10     ` Maxim Cournoyer
2021-01-28 14:16       ` Ludovic Courtès
2021-01-29 14:25         ` Maxim Cournoyer
2021-02-01 15:37           ` Ludovic Courtès
2021-02-05 10:26           ` Hartmut Goebel
2021-02-26 15:36             ` Maxim Cournoyer
2021-03-07 11:13               ` Hartmut Goebel
2021-03-14  0:58                 ` Maxim Cournoyer [this message]
2021-03-27 10:47                   ` Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfaqtutw.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.