[Nix-dev] PYTHONPATH and eggs

Mathijs Kwik mathijs at bluescreen303.nl
Fri Jul 27 09:06:44 CEST 2012


Hi Florian,

I used "buildPythonPackage" for the 2 modules (xattr and acl).
Bup itself is not a python package by itself (I think), so I gave that
a normal package, and just wrapped the (only) binary with PYTHONPATH
prefixes, as I've seen in other packages in the nixpkgs too.

Please have a look here:
https://github.com/bluescreen303/nixpkgs/commit/4426f0a2c62d42f63cc57e86e80f38b15ac85250

To test if it works, you can type "bup meta". That will now warn about
the missing libraries.

Thanks for your help,
Mathijs


On Fri, Jul 27, 2012 at 8:56 AM, Florian Friesdorf <flo at chaoflow.net> wrote:
> On Thu, 26 Jul 2012 22:31:48 +0200, Mathijs Kwik <mathijs at bluescreen303.nl> wrote:
>> Hi all,
>>
>> I'm not familiar with python packaging and module lookup, so I hope
>> someone can help here.
>>
>> I'm trying to add support for xattrs and acls to "bup".
>> I packaged pyxattr and pylibacl.
>> They build fine and leave
>> $out/lib/python2.7/site-packages/*-linux-x86_64.egg files.
>>
>> I checked the source of "bup" and it just tries "import posix1e"
>> (which is in the root of one of the eggs) at runtime (not during
>> install).
>> So I used wrapProgram and "toPythonPath" to prefix these directories
>> to PYTHONPATH at runtime.
>> I both tried adding the directory itself and the path to the egg, but
>> it doesn't work yet.
>>
>> Am I missing something?
>
> If you package python, you should use buildPythonPackage and put it into
> top-level/python-packages.nix. If that does not work, please let me
> know.
>
> Also, if you send your patches or publish them somehow I will take a
> look.
>
> 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


More information about the nix-dev mailing list