A new user interface for you!

File python-py3o-renderserver.spec of Package python-py3o-renderserver

# spec file for package python-py3o.renderserver
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:           python-py3o-renderserver
Version:        0.4.1
Release:        0
License:        BSD License
Summary:        An easy solution to transform libreoffice/openoffice documents to supported formats
Url:            http://bitbucket.org/faide/py3o.renderserver
Group:          Development/Languages/Python
Source:         https://pypi.python.org/packages/source/p/py3o.renderserver/py3o.renderserver-%{version}.tar.gz
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-setuptools
BuildRequires:  python-pyf-station >= 2.0.1
Requires:       python-pyf-station >= 2.0.1
BuildRequires:  python-pyjon-utils >= 0.6
Requires:       python-pyjon-utils >= 0.6
BuildRequires:  python-py3o-renderers-juno >= 0.7
Requires:       python-py3o-renderers-juno >= 0.7
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildArch:      noarch


This is a rendering server that will wrap an OpenOffice/LibreOffice server and provide
a pythonic API which is remotely callable.

The main advantage is that your client code does not need to import pyuno... This
is a main plus because pyuno is a pain to get working on Windows and some flavors of
Linux, don't even think of Mac :)

Once you deploy a py3o.renderserver all you need in your python code is to use the
`py3o.renderclient`_ which is really straightforward...

  .. _py3o.renderclient http://bitbucket.org/faide/py3o.renderclient


We recommend you use the dockerized versions from the `dockerhub`_ .

  .. _dockerhub: https://registry.hub.docker.com/u/xcgd/py3oserver-docker/

Using this way you'll get the latest tested version of LibreOffice and py3o.renderserver without the hassle of building all the dependencies...

Manual Installation


Install the latest JDK for your plateform. Here is an example for Ubuntu (13.04 or 14.04)::

  apt-get install default-jdk

This will give you the necessary tools to compile the juno driver.

You will need to install (and compile) the `py3o.renderers.juno`_ driver.

  .. _py3o.renderers.juno: http://bitbucket.org/faide/py3o.renderers.juno

Follow the instructions from the driver's documentation to install it and then you're ready to start your own RenderServer

Running the server

Here is how we start the server on a Linux host (Ubuntu 13.04)::

  $ start-py3o-renderserver --java=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so --ure=/usr/lib --office=/usr/lib/libreoffice --driver=juno --sofficeport=8997

You MUST have a  running LibreOffice (OpenOffice) server somewhere. In our example it is running on localhost with port 8997. Here is how you can start such a server on Linux (Ubuntu 13.04 / LibreOffice 4.0.4)::

  $ libreoffice --nologo --norestore --invisible --headless --nocrashreport --nofirststartwizard --nodefault --accept="socket,host=localhost,port=8997;urp;"

As you can see it works with OpenJDK, LibreOffice and even on 64bit systems :)

%setup -q -n py3o.renderserver-%{version}

python setup.py build

python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%doc README.rst