[Distutils] Change the python interpreter for a recipe (solved)
udono at gmx.net
Thu Aug 19 15:53:13 CEST 2010
thanks for your reply. I need to re-thing my plan for the builout and
found some ideas.
Am Donnerstag, den 19.08.2010, 09:09 -0400 schrieb Jim Fulton:
> On Thu, Aug 19, 2010 at 8:05 AM, Udo Spallek <udono at gmx.net> wrote:
> > having a problem with my buildout and like to request some hints.
> > I have a buildout which creates a simple python interpreter environment
> > like explained in the buildout manual.
> So an interpreter script.
> > Additionally I use a custom
> > script.
> Not sure what that is or why it matters.
It is a script which use the API of a trytond server (www.tryton.org) to
create a database and install several modules into this database.
The dependencies of trytond server are installed into the mypython
environment. So when I wanted to maintain trytond I need to start it
within the mypython environment, for now.
> > My problem is: How can I tell my_recipe to use the (newly created)
> > mypython interpreter, instead of using the standard python interpreter?
> You can't.
> > Or as a workaround: Is there a way to install the custom interpreter
> > before the buildout, maybe on bootstrap?
> The custom interpreter isn't a true Python installation. Generally,
> you aren't going to be able to bootstrap a buildout with it.
> Why do you want to do this? What problem are you trying to solve?
Problem is to buildout a complete deployment of trytond including a
database and installation of all needed modules. The buildout has these
1. Install dependencies into mypython as eggs
2. Install trytond and all tryton-modules needed
3. Create Database/Install Modules: (my custom recipe)
create_database if not exist
install_modules into database
4. Debian system works (init.d-script, links to /var/log, /var/run,...)
Part 3 is the problem, because for now, import trytond needs to be
started in the mypython environment, because of the dependencies.
I think I rewrite this part and use the xmlrpc API of trytond and start
the server in a prior part with a system call to an init.d-script. Then
I do the steps from 3. inside the buildout via xmlrpc. This way I do not
need the mypython environment in my recipe.
Thanks a lot! Cheers Udo
More information about the Distutils-SIG