[Nix-dev] Patch for pythonPackages.numpy

Florian Friesdorf flo at chaoflow.net
Mon Jun 18 18:14:48 CEST 2012


Hi Marc,

On Sun, 17 Jun 2012 17:16:21 +0200, Marc Weber <marco-oweber at gmx.de> wrote:
> I'm against that patch because it heavy monkey patching does not solving the
> problem at the root of the evil. My old NIX_PYTHON_SITES patch does.
> 
> Now there is evidence that such a patch is required just to make things
> work without additional work.
> 
> What does it do? Basically it patches python import code introducing
> NIX_PYTHON_SITES which behaves as PYTHON_USER_BASE *but* allows multiple
> paths to be passed.
> (..)
> What might be the difference? My code definitely picks up .pth files.
> If you use PYTHONPATH only it may not happen. (I haven't reverified it)

pth processing is not the issue, the issue is that some packages (like
matplotlib) do not create them as part of their install.

How do you deal with that? You write below that your patch adds a pth
file to solve problems with pygtk. This sounds very similar to the
approach we take:

- PYTHONPATH is used to set sys.path

- pth files are processed as normal in exec prefixes

- where this is not sufficient, include customized site.py that
  processes pth files in all dirs of PYTHONPATH

- use propagatedBuildInputs (in contrast to buildInputs) if a package
  does not use setuptools and therefor fails to create pth files and
  therefor lacks references of other packages hashes.

> About pygtk: my patch adds a .pth file instead of creating symlinks.
> Should have the same effect.
> 
> The pygtk.require('2.0') stuff (still found on pygtk documentation)
> seems to be no longer used because nobody is using gtk-1.0 anymore.

regards
florian
-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120618/2c5ef82d/attachment.bin 


More information about the nix-dev mailing list