guix-devel
[Top][All Lists]
Advanced

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

Re: Python and propagation


From: 宋文武
Subject: Re: Python and propagation
Date: Fri, 19 Feb 2016 09:26:33 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (宋文武) writes:

>> [...]
>
> I packaged python-hy, and it does find all depends without propagations.
> In its output, the trick is done by ‘python-hy-0.11.1.pth’ and ‘site.py’.
>
> After read:
>   <https://docs.python.org/2/library/site.html>
>   <http://stackoverflow.com/questions/15208615/using-pth-files>
>
> I try:
> $ mkdir -p /tmp/o
> $ mkdir -p /tmp/a
> $ echo /tmp/a > /tmp/o/x.pth
> $ cat > /tmp/o/sitecustomize.py << EOF
>> import os, site
>> dir = os.path.dirname(os.path.abspath(__fil__))
>> site.addsitedir(dir)
>> EOF
> $ PYTHONPATH=/tmp/o python3 -c 'import sys; print(sys.path)
> And ‘/tmp/a’ is at the end of the list.
>
> So, I think if we get all the pth files correct, no need to use
> propagate-inputs :-)
Oops, I’m naive.  Be able to handle indirect inputs,  pth files should
be loaded recursively.  And this was the way in nixpkgs [1], but
deprecated now [2].

It’s safe to ignore me :-)

[1] https://github.com/NixOS/nixpkgs/pull/258
[2] https://github.com/NixOS/nixpkgs/pull/11086



reply via email to

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