all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Enge <andreas@enge.fr>
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Python and propagation
Date: Thu, 18 Feb 2016 15:28:23 +0100	[thread overview]
Message-ID: <20160218142823.GA1618@solar> (raw)
In-Reply-To: <idja8my5hur.fsf@bimsb-sys02.mdc-berlin.net>

On Thu, Feb 18, 2016 at 01:21:48PM +0100, Ricardo Wurmus wrote:
> 2) avoid PYTHONPATH, patch all Python files invasively!
>     import sys
>     sys.path.append("/gnu/store/cabba9e...-numpy.../lib/...")

That sounds great! It appears to me as if you have found the equivalent of
a RUNPATH for python scripts.

It could more or less be done like the patch-shebangs phase. To me it
does not look difficult to implement. Assume it is done in a separate
phase after patching shebangs:

- Create a list of all the python inputs of the package; these are the
  inputs the package name of which starts with "python-". Or the directory
  names "/gnu/store/xxx-python-xxx", depending on what is available in
  the phase.
- Construct the corresponding string to add to the python scripts.
- Look for files starting with a shebang and having "python" as part
  of the interpreter. Then add the string after the first, shebang line
  in all these files.

Or is it more complicated than that?

Andreas

  reply	other threads:[~2016-02-18 14:28 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 [this message]
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   ` 宋文武
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=20160218142823.GA1618@solar \
    --to=andreas@enge.fr \
    --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.