IRC logs of #tryton for Thursday, 2012-05-31

chat.freenode.net #tryton log beginning Thu May 31 00:00:02 CEST 2012
2012-05-31 00:20 -!- Telesight(~anthony@s537751a5.adsl.wanadoo.nl) has left #tryton
2012-05-31 12:19 <sisalp> hello, what is the name of trytond modules for pip install ?
2012-05-31 12:20 <sisalp> tryton-modules-module_name is not ok
2012-05-31 12:25 <sisalp> neither trytond-modules-module_name , any mention in tryton documentation ?
2012-05-31 12:37 <sisalp> the names are trytond_module_name, one can find them with pip search tryton
2012-05-31 12:55 <sisalp> when I pip install I get a very limited subset of trytond in my_dir/lib/python2.7/site-packages/trytond
2012-05-31 12:56 <sisalp> it only contains modules
2012-05-31 12:56 <sisalp> I give up for now
2012-05-31 12:58 <jcm> sisalp: why don't you use hg clone?
2012-05-31 12:58 <sisalp> proteus+trytond is still a nightmare for me after several day loss :-(
2012-05-31 12:59 <sisalp> jcm: I use hg clone for all production environments, but I want to add proteus on them
2012-05-31 13:01 <sisalp> and after many tries, I figured out I have to use environments to deal with different trytond s
2012-05-31 13:02 <sisalp> main problem is that everything is to be guessed, and I cannot write documentation until I reach something which looks like a success ;-)
2012-05-31 13:02 <jcm> I didn't have such pb, I simply cloned proteus and trytond in two dirs
2012-05-31 13:03 <sisalp> jcm : then you setup trytond in the system ? and therefore I don't know how to use all other parameters
2012-05-31 13:05 <sisalp> jcm: can you get several versions of proteus and trytond s ?
2012-05-31 13:05 <jcm> I have tryton2.2/ tryton2.2/proteus tryton2.2/trytond and $PYTHONPATH has these two last paths
2012-05-31 13:06 <jcm> I think you need to change PYTHONPATH if you change your proteus and tryton version
2012-05-31 13:07 <sisalp> jcm: it would break all trytons working on the same system, wouldn't it ?
2012-05-31 13:07 <jcm> you want many versions running with the same user ? but different ports ?
2012-05-31 13:08 <sisalp> they run under no-login users
2012-05-31 13:08 <sisalp> but on different ports, yes
2012-05-31 13:08 <jcm> each user can have its own PYTHONPATH
2012-05-31 13:09 <jcm> you could even set the PYTHONPATH when calling your command I think
2012-05-31 13:09 <jcm> sry I have to go, will be connected this evening
2012-05-31 13:10 <sisalp> jcm: I think this suggests a way to dig in. trytond has to run under the user I'm logged in, iiuc
2012-05-31 13:11 <sisalp> jcm: thank you
2012-05-31 13:11 <jcm> yes and set the PYTHONPATH in its .bashrc
2012-05-31 13:11 <jcm> see you later
2012-05-31 13:11 <sisalp> so I will not use proteus inside my production hostings
2012-05-31 13:11 <sisalp> see you
2012-05-31 13:32 <udono> SISalp: Hi, are you using a single virtualenv for each tryton server, or do you try to put all servers you have into one virtualenv?
2012-05-31 13:45 <sisalp> udono: each trytond has its copy of the code, its own virtualenv, its own postgresql role abd its own linux user
2012-05-31 13:46 <sisalp> udono: the try I made this morning was to pip install trytond, but I miss something and it doesn't install properly
2012-05-31 13:47 <udono> SISalp: I guess you miss the extra requires of trytond. pip is not able to install them automatically.
2012-05-31 13:47 <udono> SISalp: Which error you get?
2012-05-31 13:48 <sisalp> I get no error, just that trytond is not installed inside the virtualenv, but probably inherited from the system
2012-05-31 13:49 <udono> SISalp: Do you have deactivated the site-packages in the virtualenv?
2012-05-31 13:49 <sisalp> I expected to get a bin/tryton and trytond directory at virtualenv root and I don't
2012-05-31 13:50 <udono> SISalp: Do you have deactivated the site-packages in the virtualenv?
2012-05-31 13:50 <sisalp> no I didn't desactivated it
2012-05-31 13:50 <udono> SISalp: Do you have a trytond installed in the system?
2012-05-31 13:50 <sisalp> I don't dare, because it may miss some other packages
2012-05-31 13:51 <sisalp> yes trytond was also installed in this server yesterday
2012-05-31 13:51 <udono> SISalp: The problem could be that pip does not install trytond since it is already installed in the system site packages.
2012-05-31 13:52 <sisalp> correct, will remove it a see what happens
2012-05-31 13:53 <udono> SISalp: I recommend to not use the system site packages for the virtual env. aptitude python-dev and try to install trytond again in the venv.
2012-05-31 13:53 <udono> SISalp: Just create a venv with no system site packages activated...
2012-05-31 13:53 <sisalp> what is python-dev ?
2012-05-31 13:55 <udono> SISalp: The developer headers for python. This is needed to build stuff like psycopg2 and lxml.
2012-05-31 13:55 <sisalp> I don't install that so far
2012-05-31 13:56 <sisalp> should I ?
2012-05-31 13:56 <udono> SISalp: These packages must be builded by pip sice the system site packages are not avail.
2012-05-31 13:56 <udono> SISalp: You need some other dependencies, I take a look...
2012-05-31 13:57 <sisalp> probably the reason why I had problems with some packages if I disable site-packages
2012-05-31 13:58 <udono> SISalp: I needed the following devel header files: python-dev
2012-05-31 13:58 <udono> libpq-dev
2012-05-31 13:58 <udono> libldap2-dev
2012-05-31 13:58 <udono> libsasl2-dev
2012-05-31 13:58 <udono> libxml2-dev
2012-05-31 13:58 <udono> libxslt-dev
2012-05-31 13:58 <udono> SISalp: Yes, exactly.
2012-05-31 14:00 <sisalp> Thank you for this help. I will give another chance in this direction this evening
2012-05-31 14:02 <sisalp> until this is stable and I'm able to document, I'll dedicate servers to run proteus
2012-05-31 14:05 <udono> SISalp: With this setup you will be able to serve different versions of trytond with differerent module setups. Each setup has the proteus included it needs.
2012-05-31 14:06 <udono> SISalp: For me it is the recommeded setup for tryton development, too.
2012-05-31 14:07 <sisalp> udono: you are right, but I cannot use something I don't fully understand, and I 'm really far from it today
2012-05-31 14:09 <udono> SISalp: I need a longer time too, to understand the *new* technologies: virtualenv, pip, virtualenvwrapper, ...
2012-05-31 14:12 <sisalp> udono: you are far more advanced than I am, and production requires proven and documented solutions
2012-05-31 14:14 <sisalp> udono: running trytond from source using system dependencies has always worked.
2012-05-31 14:15 <sisalp> udono: using virtualenv was half a success since I had to keep site-packages
2012-05-31 14:17 <sisalp> udono: I first used virtualenv to solve problems with openerp versions, tryton is much smoother
2012-05-31 14:19 <udono> SISalp: Yes, in the short term when you are on tryton versions 2.2 and 2.4 you have no bigger problems using system site packages. But in the evolution of tryton we had different requirements of system packages for different versions of trytond. To be as save as possible I can only recommend to use venv environments isolated from system python or to use strong virtualisation which has a big overhead.
2012-05-31 14:28 <sisalp> udono: I pip uninstalled trytond, then pip installed it again in the virtualenv and now lib/python2.7/site-packages/trytond seems correctly populated
2012-05-31 14:29 <sisalp> udono: I get also bin/trytond at the root, as expected.
2012-05-31 14:30 <udono> SISalp: Sounds good!
2012-05-31 14:31 <sisalp> regarding virtualisation, I do use it, but on each virtual server I have to run several trytonds, for example, production, training and test trytonds
2012-05-31 14:32 <sisalp> udono: yes brings me hope again ;-), will add proteus in the virtual env and restart my tests later
2012-05-31 14:32 <udono> SISalp: Good!
2012-05-31 14:41 -!- pjstevns(~pjstevns@nfg3.nfgs.net) has left #tryton
2012-05-31 14:41 <sisalp> udono: but I lost doc and etc directories, and don't know where to get trytond.conf model
2012-05-31 14:45 <sisalp> udono: setup.py is also lost somewhere
2012-05-31 14:46 <udono> SISalp: You will find them in the venv site packages. You should consider to clone trytond with mercurial into a project path and install it with pip -e trytond/ With this you have everything in place. It feels like a tryton-from-source but has the benefit of a real installation.
2012-05-31 15:00 <sisalp> udono: failure at start : File "/home/erp_user/openerp/test/server/bin/trytond", line 13, in <module>
2012-05-31 15:00 <sisalp> import trytond
2012-05-31 15:00 <sisalp> ImportError: No module named trytond
2012-05-31 15:09 <udono> SISalp: I use something like: /path/to/venv/bin/python /path/to/venv/bin/trytond which works fine. The trytond startup file seems not to be compatible with venv?!
2012-05-31 15:28 <sisalp> udono: I use the same paths, if it works for you, I made a mistake
2012-05-31 15:37 <udono> SISalp: what is the content of your /path/to/venv/bin/trytond ?
2012-05-31 15:37 <sisalp> udono: found and solved a first mistake. I have now to adapt the way I manage certificates for ssl
2012-05-31 15:40 <sisalp> udono: I think the main points are solved, now I have some side effects on my scripts to solve, but sounds good
2012-05-31 15:49 <sisalp> udono: turning ssl off, trytond starts ok. I will fix my certs problem later. Thank you very much for your help.
2012-05-31 16:10 <udono1> SISalp: Welcome
2012-05-31 16:16 <sisalp> udono: a (last) point : do you succeed in installing cdecimal with pip ?
2012-05-31 16:19 <udono1> SISalp: Have not try it. But I guess you need some debian dev header package for this.
2012-05-31 16:20 <sisalp> ok
2012-05-31 17:31 -!- lukio(~lukio@186.23.122.88) has left #tryton
2012-05-31 19:43 -!- plantian(~ian@c-67-161-75-111.hsd1.ca.comcast.net) has left #tryton
2012-05-31 21:01 -!- Mayank(~Mayank@122.162.44.35) has left #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!