简体   繁体   中英

Problem installing OpenERP server with buildout !

I'm trying to deploy OpenERP with a buildout and my own piece of code. In fact I would like to build a complete deployement structure allowing me to use OpenERP with custom modules and patch.

First of all, before adding any personnal configuration, I was trying to create a buildout which will have the responsability to configure everything.

Buildout Configuration

My buildout.cfg configuration file look like this:

[buildout]
parts = eggs
versions=versions
newest = false
extensions = lovely.buildouthttp
unzip = true
find-links =
       http://download.gna.org/pychart/
[versions]

[eggs]
recipe = zc.recipe.egg
interpreter = python
eggs =
     Paste
     PasteScript
     PasteDeploy
     psycopg2
     PyChart
     pydot
     openerp-server

Configuration problem

But when trying to launch the buildout I have a couples of errors when trying to install the last needed egg (openerp-server)

On my side it just cannot find these modules, but they are in my eggs dir:

Error: python module psycopg2 (PostgreSQL module) is required
Error: python module libxslt (libxslt python bindings) is required
Error: python module pychart (pychart module) is required
Error: python module pydot (pydot module) is required
error: Setup script exited with 1
An error occured when trying to install openerp-server 5.0.0-3. Look above this message for any errors that were output by easy_install.
Is this possible that openerp hardcoded the his searching path somewhere ?

easy_install, a try

I decided to give a try to a clean virtualenv without any relation to the main site-package. But when using easy_install on openerp-server:

$ source openerp-python/bin/activate
$ easy_install openerp-server
...
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 887, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  SandboxViolation: mkdir('/home/mlhamel/.python-eggs/psycopg2-2.0.13-py2.5-linux-x86_64.egg-tmp', 511) {}

I have always the error message however psyopg2 was installed or not on my machine

System's Configuration

  • Ubuntu 9.10 x86-64
  • Tried on Python 2.5/Python 2.6

Ok I did this recently:

Don't try to install the egg, openerp is not really standard.

I used this buildout snippet:

# get the openerp-stuff as a distutils package
[openerp-server]
recipe = zerokspot.recipe.distutils
urls = http://www.openerp.com/download/stable/source/openerp-server-5.0.6.tar.gz

# similar idea for the web component
[openerp-web]
recipe = zc.recipe.egg:scripts
find-links  = http://www.openerp.com/download/stable/source/openerp-web-5.0.6.tar.gz

# add some symlinks so you can run it out of bin
[server-symlinks]
recipe = cns.recipe.symlink
symlink =  ${buildout:parts-directory}/openerp-server/bin/openerp-server = ${buildout:bin-directory}

The key however, is that I did not use virtualenv. You don't need to with buildout. Buildout + virtualenv is like Trojan + Ramses... one is enough, unless you are ... well one is enough. ;)

Now for this particular project I had followed the debian instructions and installed the required libs via aptitude. This was only because I was new to buildout at the time, one could just as easily install the psycopg2 module

Here are some excellent instructions . Ignore the django stuff if you don't need it. Dan Fairs is both a great writer and great buildout tutor. Check it out. Disclaimer: I am a disciple of the man, based on his buildout usage.

I am certain you do not want to use the egg on pypi, it never worked for me, openerp is not eggified, it's a distutils package.

Good luck!

仅作记录:Pypi中提供了OpenERP的扩展配方

I'm not familiar with buildout, but if I were going to try building an OpenERP installer, I'd start by looking at the nice one from Open Source Consulting . I've used it and been pretty happy with it.

Last time I checked, it doesn't set up the CRM e-mail gateway, but everything else I need was covered.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM