[11:18:37] <iivvoo> is there a way to make buildout use a "pip freeze" requirements.txt file? Not by copy/pasting it into the [versions] section but by including it somehow?
[11:18:53] <iivvoo> this way I have a single list of versions / requirements that can be used by both pip and buildout
[11:19:01] <iivvoo> (not every hoster supports buildout, e.g. gondor)
[11:32:30] <pombreda> iivvoo: yes, there are a few recipes for this ... hold on a few minutes
[11:33:47] <pombreda> ie you want to be able to run a simple buildout that only provisions components that would use a requirements file, so it could run equally well with pip -r ?
[11:34:59] <iivvoo> well no, the buildout may do other stuff (which you'll have to do by hand in a pip-based install, or which may already be present, e.g. postgres, solr, etc)
[11:35:39] <pombreda> iivvoo: we are on the same page :P
[11:37:49] <pombreda> fwiw this is what I plan to do someday in the not yet coded pipo: http://pypi.python.org/pypi/pipo/0.0.0 :P
[11:40:30] <pombreda> iivvoo: there is one piece of untested abandonware which is not doing what you want: http://pypi.python.org/pypi/buildoutpip/
[11:40:57] <pombreda> iivvoo: and gawels' http://pypi.python.org/pypi/gp.recipe.pip would be the best candidate but it may not support reuqirements file ...
[11:43:19] <pombreda> install = -r requirements.txt in the gp.recipe.pip section should source the buildout eggs from the req file
[11:44:13] <pombreda> iivvoo: and https://github.com/pombredanne/collective.recipe.pip which I foked from someplace which seems to be gone
[11:44:50] <pombreda> this one is likely what you want and is focused on requirements
[11:46:03] <pombreda> it was originally from https://github.com/bubenkoff/collective.recipe.pip
[11:48:10] <pombreda> iivvoo: it is now here: https://github.com/collective/collective.recipe.pip
[11:48:22] <pombreda> moved there a few days ago, sounds like ..
[11:49:21] <pombreda> iivvoo: that one or gawels is likely doing what you want :)
[11:49:34] <pombreda> iivvoo: please report on your experiments
[11:51:51] <pombreda> iivvoo: there is one flaw in all this: buildout does not use pip to provision packages, so some requirements (the -e ones) may not be processed at all.... this is a buildout flaw imho as pip is now the std Python way
[11:53:38] <pombreda> iivvoo: fwiw my goal with pipo would be to have a mostly transparent tool that does the right thing consistently for you, whether you have requirements, buildout configs or plain setup or a mix of all and always operates within a virtualenv
[11:54:37] <pombreda> there are too many ways of doing things in python land package management ;) let's do one more way to rule them all :D
[13:22:46] <iivvoo> pombreda, thanks for the links / info, I'll look at them
[13:35:00] <pombreda> iivvoo: sshanx : I am looking for feedback on this : https://github.com/buildout/buildout/pull/51 ... which is to add support for conditions in a buildout section .... so that a python expression can be used to exclude some sections (or parts)
[13:35:20] <pombreda> if you guys can spare a minute to check it out and comment in the pull reuqest that would be appreciated
[13:38:37] <sshanx> is there a more complete example somewhere?
[13:38:51] <sshanx> of how this fits into a current buildout file?
[13:44:23] <pombreda> sshanx: you can see exmaples in the test case here: https://github.com/pombredanne/buildout/blob/a0e6debccf14440504eb1e3214179cb635a7342c/src/zc/buildout/configparser.test#L94
[14:10:25] <sshanx> which also has [my_section: windows]
[14:10:33] <sshanx> it would only overrule that one?
[14:10:43] <sshanx> and not a [my_section: linux] in the master buildout?
[14:11:49] <pombreda> sshanx: more or less with this implementation... it works at the config file parser level ... so each cfg file is processed individually and the general [sections] overriding work as usual ... so if you have two sections with the same name that evaluates to true, the last one loaded will win, as it does in the standard buildout
[14:13:01] <pombreda> the last section that evals to true wins, though if you use += to add or -= to remove things and both sections eval to true then they can coeexist I think
[14:13:27] <pombreda> sshanx: it does not change anything of the buildout semantics at all
[14:14:18] <pombreda> if you have two [my_section] today, the behavior with two [my_section: some expression] where both eval to true is exactly the same
[14:30:35] <mgedmin> with a setup.py that has install_requires = ["pyreadline"] if os.platform == 'winnt' else ["readline"] if os.platform == 'macosx' else []
[14:30:56] <mgedmin> (spelling for platform checks pulled from a hat, do not rely on these)
[14:31:05] <sshanx> pombreda: I think the functionality looks good
[14:31:13] <sshanx> that's all the feedback I can give you for now :)
[14:31:21] <mgedmin> I guess what I'm saying is: I'd like to see a more compelling example use-case
[14:31:30] <sshanx> good luck with getting it pulled into mainline
[15:45:32] <niluje> 2/ if the build is done in a different path than where it is deployed on the production server, we have to update all the absolute paths contained in the virtualenv
[15:45:53] <niluje> I read some docs about buildout but I'm not sure I understood everything: could it help me to improve the deployment process?
[15:49:11] <mgedmin> there's http://pypi.python.org/pypi/zc.sourcerelease that I've never used
[15:49:41] <mgedmin> but it can be used to produce RPMs from buildout-based projects, if you're running a redhat-alike on your server
[15:49:55] <mgedmin> other options: virtualenv --relocatable
[15:50:27] <mgedmin> other options: buildout with an egg cache which you populate manually by scp'ing all the required source and binary eggs so it doesn't need to go online
[15:50:37] <mgedmin> buildout has an offline = yes option which is a bit tricky
[15:51:18] <mgedmin> (a recent mailing list discussion revealed it didn't originally mean "work offline", it meant something else, and if you want "work offline" you should use some obscure option I can't remember augh)
[16:26:24] <niluje> thanks a lot for your time :-)
[16:28:52] <mgedmin> if you lack time, why not build the virtualenv in the final location on the build server, then rsync it to the same location on your prod server?
[16:32:25] <niluje> mgedmin: that what we gonna do in a first place
[16:59:58] <pombreda> niluje: the way to do what you want to do with buildout is use the download-cache option ... pin all the versions in the versions option then run the buildout once in this mode, then run the buildout with install-from-cache=true
[17:00:53] <pombreda> niluje: I start usually with a venv: python2.6 ./thirdparty/dist/virtualenv.py --no-site-packages --relocatable --never-download --extra-search-dir=./thirdparty/dist/ --distribute .
[17:05:27] <niluje> let me a minute to understand what you said :p
[17:05:53] <pombreda> niluje: sry, I assumed you were savvy at using buildout :P
[17:06:48] <niluje> nope, I tried to find a solution for the deployment and I read about buildout. I tried it unsuccessfully for 20 minutes, and went here to ask if that could possibly be a solution :p
[17:07:36] <niluje> 18:00:00 pombreda | with a prefetched venv.py
[17:07:36] <pombreda> niluje: fair enough and this is the way to go :)
[17:07:45] <niluje> what do you mean, "with a prefetched venv.py" ?
[17:08:09] <pombreda> I download and save the virtualenv.py scripts ahead of time
[17:09:13] <niluje> I really can't give a look now, I'll probably try this week-end and come back for further questions :p
[17:10:45] <niluje> anyway my problem seems tricky and at first sight your solution seems elegant, I suggest you to reply to the question I posted on serverfault, could be useful to someone else!
[17:12:06] <pombreda> niluje: gimme the url, not sure my solution is elegant but it works in a repeatable, consistent no network connection way one time and all the times
[17:12:41] <pombreda> niluje: I had to go through painfull hooks and crannies and do incantations to several gods of pythons to get it to work
[17:13:01] <niluje> it is probably much more difficult to apprehend than just copying a virtualenv
[17:14:09] <pombreda> niluje: virtualenvs are relocatable on one machine, not across machines unless they are _identical_, in general
[17:14:58] <pombreda> niluje: a relacatble venv is not a deployment solution, unless you have a very controlled and limited use case
[17:17:23] <pombreda> niluje: and fwiw my deployments includes setting up web servers, web apps, database services, cron jobs, various queue and other daemons under supervisor, a reporting engine and works across posix OSses
[17:17:42] <pombreda> you cannot get that by just relocating a virtualenv :P