all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: iyzsong@member.fsf.org (宋文武)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Python and propagation
Date: Fri, 19 Feb 2016 09:26:33 +0800	[thread overview]
Message-ID: <87d1rt8p86.fsf@member.fsf.org> (raw)
In-Reply-To: <87fuwq2h8c.fsf@member.fsf.org> ("宋文武"'s message of "Thu, 18 Feb 2016 23:03:31 +0800")

iyzsong@member.fsf.org (宋文武) 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	other threads:[~2016-02-19  1:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 12:21 Python and propagation Ricardo Wurmus
2016-02-18 14:28 ` Andreas Enge
2016-02-18 14:45   ` Ricardo Wurmus
2016-02-18 15:03     ` Andreas Enge
2016-02-18 14:56   ` Jookia
2016-02-18 15:03 ` 宋文武
2016-02-19  1:26   ` 宋文武 [this message]
2016-02-18 22:38 ` Christopher Allan Webber
2016-02-25 10:24   ` Ricardo Wurmus
2016-02-25 16:13     ` Christopher Allan Webber
2016-02-24 22:09 ` Ludovic Courtès
2016-04-04 22:08 ` Danny Milosavljevic
  -- strict thread matches above, loose matches on Subject: below --
2016-02-22 17:08 Federico Beffa

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=87d1rt8p86.fsf@member.fsf.org \
    --to=iyzsong@member.fsf.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /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.