[Nix-dev] Patch for pythonPackages.numpy
Marc Weber
marco-oweber at gmx.de
Thu Jun 21 13:54:51 CEST 2012
Excerpts from Florian Friesdorf's message of Mon Jun 18 18:14:48 +0200 2012:
> pth processing is not the issue, the issue is that some packages (like
> matplotlib) do not create them as part of their install.
I don't know. I just ran a a simple gtk sample - and it worked (after
making sure gtk is recognized when building matplotlib).
The main difference is that I looked up what PYTHONUSERBASE does and
did the same for multiple paths. I didn't even try to understand all
details. I never had real trouble due to that - but it looks like the
the traditional way in nixpkgs caused issues (eg virtinst).
If you know why I'd like to learn about it so that I stop making false
assumptions .. :)
Some additional small changes I did are always adding $out to
NIX_PYTHON_SITES when python is added as buildinput - so things always
work without libraries telling you "trying to install into location not
read by PYTHONPATH" or the like. Maybe its overkill - it stops bothering
me that way.
> How do you deal with that? You write below that your patch adds a pth
> file to solve problems with pygtk.
The pygtk comments are outdated. I assumed that import pygtk;
pygtk.require("2.0") is still the way to go but its no longer the case.
Everyone is using 2.0 now - so people just drop that require line
usually.
Instead of symlinking everything I just added one .pth file. I'm don't
have a strong feeling about which is better. And that .pth file is added
whenever a gtk-2.0 dir is found by using a small setup-hook snippet so
that py-gnome and the like just work as well (and whatever package is
using the same directory layout)
Marc Weber
More information about the nix-dev
mailing list