Buildout: adding a link to a compiled library: uno

Hi, I have many web projects that depend on 'uno' component of openoffice to prepare pdf. I don't really need to compile it inside my buildout env. I'm not really inclined to do that as I know dev and deply is always in an environment with a working system 'uno' package. Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to the site-packages directory. Which is the best way to accomplish a simple setup as this one under buildout? thanks in advance sandro *:-) -- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy

Hi Alessandro, If you are going to use the Python that comes with your distribution (usually referred to as 'System Python'), and that you want to use the "uno" library that comes with this System Python, that is, you can do something like: $ python Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import uno print uno.__file__ /usr/lib/python2.6/dist-packages/uno.pyc
Then, what you probably need is to use a part with a z3c.recipe.scripts recipe, configuring it like described at [1], to give you access to the system-installed uno library. [1] http://pypi.python.org/pypi/z3c.recipe.scripts#including-site-packages-and-s... Regards, Leo On Sun, Apr 1, 2012 at 10:47, Alessandro Dentella <sandro@e-den.it> wrote:
Hi,
I have many web projects that depend on 'uno' component of openoffice to prepare pdf. I don't really need to compile it inside my buildout env. I'm not really inclined to do that as I know dev and deply is always in an environment with a working system 'uno' package.
Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to the site-packages directory.
Which is the best way to accomplish a simple setup as this one under buildout?
thanks in advance
sandro *:-)
-- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig

On 01-04-12 10:47, Alessandro Dentella wrote:
I have many web projects that depend on 'uno' component of openoffice to prepare pdf. I don't really need to compile it inside my buildout env. I'm not really inclined to do that as I know dev and deply is always in an environment with a working system 'uno' package.
Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to the site-packages directory.
Which is the best way to accomplish a simple setup as this one under buildout?
The easiest way, at least that I have seen, is to use osc.recipe.sysegg: http://pypi.python.org/pypi/osc.recipe.sysegg But you'll need to use buildout version 1.4.4 with this (and thus a special 1.4.4 using bootstrap) to get it to work as the latest buildout (1.5) broke the osc.recipe.sysegg recipe. (1.5 is supposed to work with existing system-level eggs, but I couldn't get it to work reliably in my kind of setup). Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham"

Reinout van Rees <reinout@vanrees.org> writes:
On 01-04-12 10:47, Alessandro Dentella wrote:
I have many web projects that depend on 'uno' component of openoffice to prepare pdf. I don't really need to compile it inside my buildout env. I'm not really inclined to do that as I know dev and deply is always in an environment with a working system 'uno' package.
Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to the site-packages directory.
Which is the best way to accomplish a simple setup as this one under buildout?
The easiest way, at least that I have seen, is to use osc.recipe.sysegg:
http://pypi.python.org/pypi/osc.recipe.sysegg
But you'll need to use buildout version 1.4.4 with this (and thus a special 1.4.4 using bootstrap) to get it to work as the latest buildout (1.5) broke the osc.recipe.sysegg recipe.
(1.5 is supposed to work with existing system-level eggs, but I couldn't get it to work reliably in my kind of setup).
Have you seen those problems with the 1.5.2 release? Ross

On 04-04-12 03:38, Ross Patterson wrote:
(1.5 is supposed to work with existing system-level eggs, but I
couldn't get it to work reliably in my kind of setup). Have you seen those problems with the 1.5.2 release?
Yes. iirc the most basic problem was that you HAVE to pin the version, otherwise the system egg isn't used. Which of course doesn't work as the version on my OSX laptop is bound to be a bit different from that on a colleague's ubuntu. And I thought ubuntu's site.py mangling didn't get recognized by 1.5.2, but that might have been the above problem. Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham"

On Tue, Apr 03, 2012 at 01:59:14AM +0200, Reinout van Rees wrote:
On 01-04-12 10:47, Alessandro Dentella wrote:
I have many web projects that depend on 'uno' component of openoffice to prepare pdf. I don't really need to compile it inside my buildout env. I'm not really inclined to do that as I know dev and deply is always in an environment with a working system 'uno' package.
Under virtualenv all I do is to add 2 symlinks to uno.py and unohelp.py to the site-packages directory.
Which is the best way to accomplish a simple setup as this one under buildout?
The easiest way, at least that I have seen, is to use osc.recipe.sysegg:
http://pypi.python.org/pypi/osc.recipe.sysegg
But you'll need to use buildout version 1.4.4 with this (and thus a special 1.4.4 using bootstrap) to get it to work as the latest buildout (1.5) broke the osc.recipe.sysegg recipe.
(1.5 is supposed to work with existing system-level eggs, but I couldn't get it to work reliably in my kind of setup).
Since I also wanted to isolate my environment I started using tl.buildout_virtual_python that offers a siple extra-path variable that accomplishes to my request in a simple way. thanks sandro *:-) -- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy
participants (4)
-
Alessandro Dentella
-
Leonardo Rochael Almeida
-
Reinout van Rees
-
Ross Patterson