From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: Python and propagation Date: Fri, 19 Feb 2016 09:26:33 +0800 Message-ID: <87d1rt8p86.fsf@member.fsf.org> References: <87fuwq2h8c.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWZqS-0003q0-1S for guix-devel@gnu.org; Thu, 18 Feb 2016 20:26:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWZqO-00082T-SP for guix-devel@gnu.org; Thu, 18 Feb 2016 20:26:55 -0500 Received: from smtp20.openmailbox.org ([62.4.1.54]:39247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWZqO-000822-Ml for guix-devel@gnu.org; Thu, 18 Feb 2016 20:26:52 -0500 In-Reply-To: <87fuwq2h8c.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Thu, 18 Feb 2016 23:03:31 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) writes: >> [...] > > I packaged python-hy, and it does find all depends without propagations. > In its output, the trick is done by =E2=80=98python-hy-0.11.1.pth=E2=80= =99 and =E2=80=98site.py=E2=80=99. > > After read: > > > > 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 =3D os.path.dirname(os.path.abspath(__fil__)) >> site.addsitedir(dir) >> EOF > $ PYTHONPATH=3D/tmp/o python3 -c 'import sys; print(sys.path) > And =E2=80=98/tmp/a=E2=80=99 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=E2=80=99m naive. Be able to handle indirect inputs, pth files sho= uld be loaded recursively. And this was the way in nixpkgs [1], but deprecated now [2]. It=E2=80=99s safe to ignore me :-) [1] https://github.com/NixOS/nixpkgs/pull/258 [2] https://github.com/NixOS/nixpkgs/pull/11086