English 中文(简体)
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!

Just for the record: there is a buildout recipe for OpenERP available in Pypi.

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.





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签