Skip to content

Commit

Permalink
[FIX] packaging: add qrcode package to docker file
Browse files Browse the repository at this point in the history
After the Odoo package is built, the package.py script uses a Docker
image to test the package. After that python3-qrcode was added as a
dependency for the package in 2ff49c5 , it revealed some issues.

A missing cli parameter and a forgotten '&&' in the Dockerfile prevented
the installation of the depending packages.

Also, the script shebang was wrong by launching python2.

Finally, the fact that python3-xlwt is missing in Debian stretch was
highlighted. With this commit, the python3-xlwt is explicitly removed
from the dependencies and the documentation is updated accordingly.

closes odoo#28807
  • Loading branch information
d-fence committed Nov 19, 2018
1 parent 7c3d5dc commit 51ee0c3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions debian/py3dist-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xlwt
14 changes: 4 additions & 10 deletions doc/setup/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,15 @@ Or ``dpkg``:
This will install Odoo as a service, create the necessary PostgreSQL_ user
and automatically start the server.

.. warning:: The 3 following python packages are only suggested by the Debian package.
Those packages are not available in Ubuntu Xenial (16.04).
.. warning:: The python3-xlwt Debian package does not exists in Debian Stretch nor Ubuntu 18.04.
This python module is needed to export into xls format.

* python3-vobject: Used in calendars to produce ical files.
* python3-pyldap: Used to authenticat users with LDAP.
* python3-qrcode: Used by the hardware driver for ESC/POS

If you need one or all of the packages mentioned in the above warning, you can install them manually.
If you need the feature, you can install it manually.
One way to do it, is simply using pip3 like this:

.. code-block:: console
$ sudo pip3 install vobject qrcode
$ sudo apt install libldap2-dev libsasl2-dev
$ sudo pip3 install pyldap
$ sudo pip3 install xlwt
.. warning:: Debian 9 and Ubuntu do not provide a package for the python module
num2words.
Expand Down
5 changes: 3 additions & 2 deletions setup/package.dfdebian
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV LC_ALL C.UTF-8

RUN apt-get update -qq && \
apt-get upgrade -qq -y && \
apt-get install \
apt-get install -qq -y\
adduser \
postgresql \
postgresql-client \
Expand All @@ -40,6 +40,7 @@ RUN apt-get update -qq && \
python3-pydot \
python3-pyparsing \
python3-pypdf2 \
python3-qrcode \
python3-reportlab \
python3-requests \
python3-serial \
Expand All @@ -49,7 +50,7 @@ RUN apt-get update -qq && \
python3-vatnumber \
python3-vobject \
python3-werkzeug \
python3-xlsxwriter \
python3-xlsxwriter && \
rm -rf /var/lib/apt/lists/*

RUN echo "PS1=\"[\u@nightly-tests] # \"" > ~/.bashrc
2 changes: 1 addition & 1 deletion setup/package.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from __future__ import print_function
Expand Down

0 comments on commit 51ee0c3

Please sign in to comment.