← Back to team overview

openerp-community team mailing list archive

Re: [anybox.buildbot.openerp] should bootstrap.py be run with python -S?

 

On 02/22/2014 08:54 AM, Michael Telahun Makonnen wrote:
> Hi Alexandre,
> 
> I didn't know about python -S. Thanks for sharing that.


Yes, we didn't think of it either.
We've been using virtualenvs without setuptools for that same purpose,
and explained it here in the buildout recipe documentation :
http://pythonhosted.org/anybox.recipe.openerp/first_steps.html#bootstrapping-the-buildout


In the buildbot configurator, you can use such a virtualenv with the

    bootstrap-virtualenv = true

option in MANIFEST.cfg (that virtualenv path is currently hard-coded to
$HOME/openerp-env

> 
> About the aeroo reports packages: I just keep a copy of the LibreOffice
> installation debs from somewhere like
> http://download.documentfoundation.org/libreoffice/stable/3.6.5/deb/x86/LibO_3.6.5_Linux_x86_install-deb_en-US.tar.gz.
> and I have a small script that installs them to the buildout using dpkg-deb:
> 
> dpkg-deb -x deb_file.deb /path/to/buildout/sandbox
> 
> and then I add the appropriate directory to sys.path:
> /path/to/buildout/sandbox/opt/libreoffice3.6/program.


we're doing something a bit more direct :

- using the distribution provided version of LibreOffice, or rather in
that case python-uno
- direct symlinking of uno.py and unohelper.py into the virtualenv's
site-packages. They don't do much more than tweaking sys.path anyway.
I suppose the same could be achieved with another installation method,
such as the deb provided by LibreO project.

- for the buildbot application, identify those slaves that have
uno-ready virtualenvs using the capability system. Here's a excerpt:

    capability = postgresql 9.2 bin=/usr/lib/postgresql/9.2/bin
lib=/usr/lib/postgresql/9.2/lib port=5433
                 postgresql 9.3 bin=/usr/lib/postgresql/9.3/bin
lib=/usr/lib/postgresql/9.3/lib port=5434
                 python-uno
                 debian-based
                 python 2.7
                 openerp-virtualenv


Note that we don't go all the way to continusouly test the actual
production of PDF reports with aeroo. I'm pretty much convincend that
unless one would want to test the aeroo_ooo itself, it would have not
much added value. On the buildslaves, it's enough to be able to import uno.

Regards,


> 
> On 02/21/2014 06:20 PM, Alexandre Fayolle wrote:
>> Hello everyone,
>>
>> I'm currently trying to setup anybox.buildbot.openerp, I've succeeded in
>> doing my first builds.
>>
>> I had to tweak a bit the recipe, and I'm not sure if the tweak in
>> question deserves an option, some hardcoding or a fix in the setup of my
>> build slaves.
>>
>> The setting:
>>
>> the build slaves runs on a Debian or Ubuntu boxes on which
>> python-setuptools 0.6.24 is installed.
>>
>> In that case, running "python bootstrap.py --find-links
>> ../../buildout-caches/eggs -c ocb-7.0.cfg --version=2.2.1" fails with
>> the following error:
>>
>> Traceback (most recent call last):
>>   File "bootstrap.py", line 159, in <module>
>>     ws.require(requirement)
>>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in
>> require
>>     needed = self.resolve(parse_requirements(requirements))
>>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 588, in
>> resolve
>>     raise VersionConflict(dist,req) # XXX put more info here
>> pkg_resources.VersionConflict: (setuptools 0.6c11
>> (/usr/lib/python2.7/dist-packages), Requirement.parse('setuptools>=0.7'))
>>
>> It is possible to work around this by using "python -S bootstrap.py ..."
>> or by removing python-setuptools from the slave.
>>
>> At Camptocamp we generally build our OpenERP buildout by bootstrapping
>> with python -S to fully insulate the buildout from the system packages,
>> so I'd be tempted to do this, but I understand that it can be necessary
>> to use system packages (typically for aeroo reports, because rebuilding
>> python-uno and LibreOffice is quite painful).
>>
>> I temporarily added the -S flag locally to get going, but I'm interested
>> in hearing people's opinion on this (and I can probably create a smarter
>> fix once an agreement has been reached).
>>
>>
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
> 


-- 
Georges Racinet
Anybox SAS, http://anybox.fr
Bureau: 09 72 39 50 97 / 09 72 39 13 06
Portable: 06 51 32 07 27
GPG: 0x33AB0A35, sur serveurs publics

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References