Re: [Nix-dev] PYTHONPATH and eggs
On Thu, 26 Jul 2012 22:31:48 +0200, Mathijs Kwik math...@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 f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC pgpqIF2tGMujv.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PYTHONPATH and eggs
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 f...@chaoflow.net wrote: On Thu, 26 Jul 2012 22:31:48 +0200, Mathijs Kwik math...@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 f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PYTHONPATH and eggs
Hi Mathijs, On Fri, 27 Jul 2012 09:06:44 +0200, Mathijs Kwik math...@bluescreen303.nl wrote: 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. I had to disable the tests for pylibacl, but bup meta does not give an error, also the generated wrapper looks good - do you still have the error? regards florian -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC pgpaylXas3R3D.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] (sudo (-H)) nix-collect-garbage
On Mon, 02 Jul 2012 10:39:03 -0400, Eelco Dolstra eelco.dols...@logicblox.com wrote: Hi, On 02/07/12 10:09, Florian Friesdorf wrote: can somebody explain me what is going on here? Summary: - garbage collect as user - rerun garbage collect as user - nothing to do - sudo garbage collect - more work to do including scary 'invalidating' actions Why is root garbage collecting more than user? Because you're using sudo and sudo doesn't propagate the $NIX_CONF_DIR environment variable. Because of this the Nix configuration file in /etc/nix/nix.conf won't be used. By default it contains a line gc-keep-outputs = true which prevents the outputs of derivations from being garbage collected. This explains that sudo nix-collect-garbage will suddenly garbage-collect tarballs like xmonad-0.10.tar.gz. Maybe we should add an env_keep line for $NIX_CONF_DIR to sudoers. just pushed after testing it locally: % nix-collect-garbage cleaning % sudo nix-collect-garbage nothing to be done % sudo -H nix-collect-garbage nothing to be done -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC pgp9S7kXCB376.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] (sudo (-H)) nix-collect-garbage
Hi Florian, before we start propagating any env vars can you make me understand why a user have a different value than root? If does this happen intenionally? Would exporting NIX_CONF_DIR in profile.sh (nixos repo) be an alternative? If so why is your solution better? Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PYTHONPATH and eggs
That's strange then :) I disabled the test too, but the problem remains. Just to be clear, it's a warning, not an error: % bup meta Warning: Linux xattr support missing; install python-pyxattr. Warning: POSIX ACL support missing; install python-pylibacl. usage: bup meta --create [OPTION ...] PATH ... or: bup meta --extract [OPTION ...] or: bup meta --start-extract [OPTION ...] or: bup meta --finish-extract [OPTION ...] % cat `which bup` #! /nix/store/043zrsanirjh8nbc5vqpjn93hhrf107f-bash-4.2-p24/bin/bash -e export PYTHONPATH=/nix/store/ixp90035n4xrr6y4kcvcb36cd6rpcz0a-python-pyxattr-0.5.1/lib/python2.7/site-packages:/nix/store/kczagr8sv3yx355jy63byv7i7jngbx9v-python-pylibacl-0.5.1/lib/python2.7/site-packages:/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/site-packages:/nix/store/93lbhnm76wlkmq7r0z8lwk3g9ch76hjp-git-1.7.11/lib/python2.7/site-packages${PYTHONPATH:+:}$PYTHONPATH exec /nix/store/a8525w6briwiij324lnv425495jr9dcn-bup-0.25git20120722/bin/.bup-wrapped ${extraFlagsArray[@]} $@ % ls -l /nix/store/ixp90035n4xrr6y4kcvcb36cd6rpcz0a-python-pyxattr-0.5.1/lib/python2.7/site-packages total 40 -r--r--r-- 1 root nixbld 224 1 jan 1970 easy-install.pth -r--r--r-- 1 root nixbld 25699 1 jan 1970 pyxattr-0.5.1-py2.7-linux-x86_64.egg -r--r--r-- 1 root nixbld 2362 1 jan 1970 site.py -r--r--r-- 1 root nixbld 1845 1 jan 1970 site.pyc % ls -l /nix/store/kczagr8sv3yx355jy63byv7i7jngbx9v-python-pylibacl-0.5.1/lib/python2.7/site-packages total 44 -r--r--r-- 1 root nixbld 225 1 jan 1970 easy-install.pth -r--r--r-- 1 root nixbld 31620 1 jan 1970 pylibacl-0.5.1-py2.7-linux-x86_64.egg -r--r--r-- 1 root nixbld 2362 1 jan 1970 site.py -r--r--r-- 1 root nixbld 1847 1 jan 1970 site.pyc How can I debug this further? Thanks, Mathijs On Fri, Jul 27, 2012 at 12:07 PM, Florian Friesdorf f...@chaoflow.net wrote: Hi Mathijs, On Fri, 27 Jul 2012 09:06:44 +0200, Mathijs Kwik math...@bluescreen303.nl wrote: 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. I had to disable the tests for pylibacl, but bup meta does not give an error, also the generated wrapper looks good - do you still have the error? regards florian -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PYTHONPATH and eggs
On Fri, Jul 27, 2012 at 1:42 PM, Florian Friesdorf f...@chaoflow.net wrote: On Fri, 27 Jul 2012 13:29:03 +0200, Mathijs Kwik math...@bluescreen303.nl wrote: That's strange then :) I disabled the test too, but the problem remains. Just to be clear, it's a warning, not an error: % bup meta Warning: Linux xattr support missing; install python-pyxattr. Warning: POSIX ACL support missing; install python-pylibacl. usage: bup meta --create [OPTION ...] PATH ... or: bup meta --extract [OPTION ...] or: bup meta --start-extract [OPTION ...] or: bup meta --finish-extract [OPTION ...] sorry - I have the same - was looking out for python import errors. How can I debug this further? % /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py .nix-profile/bin/bup Traceback (most recent call last): File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py, line 1314, in main pdb._runscript(mainpyfile) File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py, line 1233, in _runscript self.run(statement) File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/bdb.py, line 387, in run exec cmd in globals, locals File string, line 1, in module File .nix-profile/bin/bup, line 2 export PYTHONPATH=/nix/store/ixp90035n4xrr6y4kcvcb36cd6rpcz0a-python-pyxattr-0.5.1/lib/python2.7/site-packages:/nix/store/kczagr8sv3yx355jy63byv7i7jngbx9v-python-pylibacl-0.5.1/lib/python2.7/site-packages:/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/site-packages:/nix/store/93lbhnm76wlkmq7r0z8lwk3g9ch76hjp-git-1.7.11/lib/python2.7/site-packages${PYTHONPATH:+:}$PYTHONPATH ^ SyntaxError: invalid syntax Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program string(1)module() (Pdb) So the wrapper actually is not good. If I understand correctly, you've run pdb on the wrapper, which is a shell script, rather than the wrapped python code, is that right? ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PYTHONPATH and eggs
On Fri, 27 Jul 2012 14:32:47 +0200, Cillian de Róiste cillian.deroi...@gmail.com wrote: On Fri, Jul 27, 2012 at 1:42 PM, Florian Friesdorf f...@chaoflow.net wrote: On Fri, 27 Jul 2012 13:29:03 +0200, Mathijs Kwik math...@bluescreen303.nl wrote: That's strange then :) I disabled the test too, but the problem remains. Just to be clear, it's a warning, not an error: % bup meta Warning: Linux xattr support missing; install python-pyxattr. Warning: POSIX ACL support missing; install python-pylibacl. usage: bup meta --create [OPTION ...] PATH ... or: bup meta --extract [OPTION ...] or: bup meta --start-extract [OPTION ...] or: bup meta --finish-extract [OPTION ...] sorry - I have the same - was looking out for python import errors. How can I debug this further? % /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py .nix-profile/bin/bup Traceback (most recent call last): File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py, line 1314, in main pdb._runscript(mainpyfile) File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py, line 1233, in _runscript self.run(statement) File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/bdb.py, line 387, in run exec cmd in globals, locals File string, line 1, in module File .nix-profile/bin/bup, line 2 export PYTHONPATH=/nix/store/ixp90035n4xrr6y4kcvcb36cd6rpcz0a-python-pyxattr-0.5.1/lib/python2.7/site-packages:/nix/store/kczagr8sv3yx355jy63byv7i7jngbx9v-python-pylibacl-0.5.1/lib/python2.7/site-packages:/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/site-packages:/nix/store/93lbhnm76wlkmq7r0z8lwk3g9ch76hjp-git-1.7.11/lib/python2.7/site-packages${PYTHONPATH:+:}$PYTHONPATH ^ SyntaxError: invalid syntax Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program string(1)module() (Pdb) So the wrapper actually is not good. If I understand correctly, you've run pdb on the wrapper, which is a shell script, rather than the wrapped python code, is that right? hihi - yes correct is: % /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py\ /nix/store/c4inzdbs8ckpd22sm928kqywnz9xpknj-bup-0.25git20120722/bin/.bup-wrapped\ meta then check sys.path /nix/store/c4inzdbs8ckpd22sm928kqywnz9xpknj-bup-0.25git20120722/bin/.bup-wrapped(2)module() - import sys, os, subprocess, signal, getopt (Pdb) import sys,pprint (Pdb) pprint.pprint(sys.path) ['/nix/store/c4inzdbs8ckpd22sm928kqywnz9xpknj-bup-0.25git20120722/bin', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/site-packages', '/nix/store/9vx5rqgbmjvp8320kv2xzd9pg27r8i2n-python-bsddb-2.7.3/lib/python2.7/site-packages', '/nix/store/l76wlc1pimd372hwff6c1mxrc5bm3ym6-python-curses-2.7.3/lib/python2.7/site-packages', '/nix/store/vmbzx7h0pvvcvrisj1bgvrhb3q9xkgs8-python-gdbm-2.7.3/lib/python2.7/site-packages', '/nix/store/36yvgidmiwsdl8cz9xh1zwfpaqxgfslh-python-readline-2.7.3/lib/python2.7/site-packages', '/nix/store/a3rc404sxi4d4adwr6r0rsphbal1qai5-python-sqlite3-2.7.3/lib/python2.7/site-packages', '/nix/store/i1idllnq0130b89cjwjn0s926bzlihsy-python-tkinter-2.7.3/lib/python2.7/site-packages', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python27.zip', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/plat-linux2', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/lib-tk', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/lib-old', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/lib-dynload'] (Pdb) print sys.exec_prefix /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3 pyxattr and pylibacl are not in sys.path. At least their site-packages dir should be and the pth file (see below) should then add the egg. I also gave it a quick test with our python branch - same problem. Something is weird. I might have a look during the weekend. % cat .nix-profile/bin/bup #! /nix/store/043zrsanirjh8nbc5vqpjn93hhrf107f-bash-4.2-p24/bin/bash -e export PYTHONPATH=/nix/store/ixp90035n4xrr6y4kcvcb36cd6rpcz0a-python-pyxattr-0.5.1/lib/python2.7/site-packages:/nix/store/kczagr8sv3yx355jy63byv7i7jngbx9v-python-pylibacl-0.5.1/lib/python2.7/site-packages:/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/site-packages:/nix/store/93lbhnm76wlkmq7r0z8lwk3g9ch76hjp-git-1.7.11/lib/python2.7/site-packages${PYTHONPATH:+:}$PYTHONPATH exec /nix/store/c4inzdbs8ckpd22sm928kqywnz9xpknj-bup-0.25git20120722/bin/.bup-wrapped ${extraFlagsArray[@]} $@ % ls -l
Re: [Nix-dev] (sudo (-H)) nix-collect-garbage
Hi Marc, On Fri, 27 Jul 2012 12:41:48 +0200, Marc Weber marco-owe...@gmx.de wrote: Hi Florian, before we start propagating any env vars can you make me understand why a user have a different value than root? If does this happen intenionally? Would exporting NIX_CONF_DIR in profile.sh (nixos repo) be an alternative? If so why is your solution better? I took the approach already for other env vars (see sudoers) and for NIX_DIR_CONF Eelco suggested to do the same. But, I think we should have a deeper look at sudo, how it can be used and how we are using it - policy document. The intersting bits are: sudo foo vs. sudo -H foo vs. sudo -i foo NIX_DIR_CONF is exported in /etc/profile, but this is not loaded except for sudo -i. I currently think that bringing certain env vars into the sudo env is the correct way, but I'd appreciate other opinions on that. regards florian -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC pgpfBkMF8aUIm.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Nix Policy Documentation
Hi Shea, first of all: thank you very much for getting this started! On Tue, 3 Jul 2012 09:13:31 -0400, Shea Levy s...@shealevy.com wrote: So now to my first two questions: 1. Does anyone have any suggestions for other policy documents that I could model this work after? 2. Which subjects would you like to see covered in the document? - How do we support sudo / what is the supported usage of sudo (currently under discussion). - When to create a pull request / when not - common sense with examples. When to merge a pull request / when to just apply it's patches. - Where to put new packages / how is all-packages sorted If some of this is already documented somewhere, I think it should be moved into a policy document. And thinking of it, the policy document should be a section of the manual. regards florian -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC pgpJptRjGljiq.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Nix Policy Documentation
On Fri, 27 Jul 2012 16:02:26 +0200, Florian Friesdorf f...@chaoflow.net wrote: Hi Shea, first of all: thank you very much for getting this started! On Tue, 3 Jul 2012 09:13:31 -0400, Shea Levy s...@shealevy.com wrote: So now to my first two questions: 1. Does anyone have any suggestions for other policy documents that I could model this work after? 2. Which subjects would you like to see covered in the document? - How do we support sudo / what is the supported usage of sudo (currently under discussion). - When to create a pull request / when not - common sense with examples. When to merge a pull request / when to just apply it's patches. - Where to put new packages / how is all-packages sorted - How much magic is good / bad in a nix expression and when to generate the nix file using for example a template (see still open discussion) In order to put them somewhere, I would also add a section with items we so far could not achieve consens on, with distilled conflicting opinions. Let me know if I can help. I'd appreciate restructured text as format and a git repo somewhere, but am open for other things. I don't like weird markup syntaxes, most wikis are using. If some of this is already documented somewhere, I think it should be moved into a policy document. And thinking of it, the policy document should be a section of the manual. regards florian -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC pgpsli6Avb6WA.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] reverse dependencies
On Sat, 21 Jul 2012 18:15:27 +0200, Florian Friesdorf f...@chaoflow.net wrote: On Sat, 21 Jul 2012 18:10:23 +0200, Marc Weber marco-owe...@gmx.de wrote: Excerpts from Florian Friesdorf's message of Sat Jul 21 17:50:55 +0200 2012: how do we get all packages using a derivation (e.g. python27) either directly or indirectly? nix-store has some options. If that's not enough access /nix/var/nix/db/db.sqlite and run your own queries. Or patch nix-store. We'd like to know it for all expressions, not just the ones in the store. To sum this thread up: In a different thread Eelco proposed a solution, which Cillian put into the wiki: https://nixos.org/wiki/Contributing -- Florian Friesdorf f...@chaoflow.net GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC pgp1vm5Gly1HL.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] (sudo (-H)) nix-collect-garbage
All right. I agree that its the best solution. Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PYTHONPATH and eggs
On Fri, Jul 27, 2012 at 3:30 PM, Florian Friesdorf f...@chaoflow.net wrote: On Fri, 27 Jul 2012 14:32:47 +0200, Cillian de Róiste cillian.deroi...@gmail.com wrote: On Fri, Jul 27, 2012 at 1:42 PM, Florian Friesdorf f...@chaoflow.net wrote: On Fri, 27 Jul 2012 13:29:03 +0200, Mathijs Kwik math...@bluescreen303.nl wrote: That's strange then :) I disabled the test too, but the problem remains. Just to be clear, it's a warning, not an error: % bup meta Warning: Linux xattr support missing; install python-pyxattr. Warning: POSIX ACL support missing; install python-pylibacl. usage: bup meta --create [OPTION ...] PATH ... or: bup meta --extract [OPTION ...] or: bup meta --start-extract [OPTION ...] or: bup meta --finish-extract [OPTION ...] sorry - I have the same - was looking out for python import errors. How can I debug this further? % /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py .nix-profile/bin/bup Traceback (most recent call last): File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py, line 1314, in main pdb._runscript(mainpyfile) File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py, line 1233, in _runscript self.run(statement) File /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/bdb.py, line 387, in run exec cmd in globals, locals File string, line 1, in module File .nix-profile/bin/bup, line 2 export PYTHONPATH=/nix/store/ixp90035n4xrr6y4kcvcb36cd6rpcz0a-python-pyxattr-0.5.1/lib/python2.7/site-packages:/nix/store/kczagr8sv3yx355jy63byv7i7jngbx9v-python-pylibacl-0.5.1/lib/python2.7/site-packages:/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/site-packages:/nix/store/93lbhnm76wlkmq7r0z8lwk3g9ch76hjp-git-1.7.11/lib/python2.7/site-packages${PYTHONPATH:+:}$PYTHONPATH ^ SyntaxError: invalid syntax Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program string(1)module() (Pdb) So the wrapper actually is not good. If I understand correctly, you've run pdb on the wrapper, which is a shell script, rather than the wrapped python code, is that right? hihi - yes correct is: % /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/pdb.py\ /nix/store/c4inzdbs8ckpd22sm928kqywnz9xpknj-bup-0.25git20120722/bin/.bup-wrapped\ meta then check sys.path /nix/store/c4inzdbs8ckpd22sm928kqywnz9xpknj-bup-0.25git20120722/bin/.bup-wrapped(2)module() - import sys, os, subprocess, signal, getopt (Pdb) import sys,pprint (Pdb) pprint.pprint(sys.path) ['/nix/store/c4inzdbs8ckpd22sm928kqywnz9xpknj-bup-0.25git20120722/bin', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/site-packages', '/nix/store/9vx5rqgbmjvp8320kv2xzd9pg27r8i2n-python-bsddb-2.7.3/lib/python2.7/site-packages', '/nix/store/l76wlc1pimd372hwff6c1mxrc5bm3ym6-python-curses-2.7.3/lib/python2.7/site-packages', '/nix/store/vmbzx7h0pvvcvrisj1bgvrhb3q9xkgs8-python-gdbm-2.7.3/lib/python2.7/site-packages', '/nix/store/36yvgidmiwsdl8cz9xh1zwfpaqxgfslh-python-readline-2.7.3/lib/python2.7/site-packages', '/nix/store/a3rc404sxi4d4adwr6r0rsphbal1qai5-python-sqlite3-2.7.3/lib/python2.7/site-packages', '/nix/store/i1idllnq0130b89cjwjn0s926bzlihsy-python-tkinter-2.7.3/lib/python2.7/site-packages', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python27.zip', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/plat-linux2', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/lib-tk', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/lib-old', '/nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3/lib/python2.7/lib-dynload'] (Pdb) print sys.exec_prefix /nix/store/5qmz5wc596kl7rywx56phyl2gb0052w7-python-2.7.3 pyxattr and pylibacl are not in sys.path. At least their site-packages dir should be and the pth file (see below) should then add the egg. I also gave it a quick test with our python branch - same problem. Something is weird. I might have a look during the weekend. Would be very helpful, thanks! If you figure out how to do these 2, I can probably work out more optional deps, like python-fuse. Have a nice weekend % cat .nix-profile/bin/bup #! /nix/store/043zrsanirjh8nbc5vqpjn93hhrf107f-bash-4.2-p24/bin/bash -e export