[IMP] doc: update windows source code instructions
remove psutil dependency under windows
reverts documentation commit 96aba067a8
because
it prevent sphinx build
merge setup source code and vcs checkout sections and simplify wording
simplify source installation instructions for windows
This commit is contained in:
parent
4c1908088c
commit
84419fcd0a
|
@ -54,6 +54,7 @@ Index: addons/openacademy/views/session_board.xml
|
||||||
+ <record model="ir.ui.view" id="board_session_form">
|
+ <record model="ir.ui.view" id="board_session_form">
|
||||||
+ <field name="name">Session Dashboard Form</field>
|
+ <field name="name">Session Dashboard Form</field>
|
||||||
+ <field name="model">board.board</field>
|
+ <field name="model">board.board</field>
|
||||||
|
+ <field name="type">form</field>
|
||||||
+ <field name="arch" type="xml">
|
+ <field name="arch" type="xml">
|
||||||
+ <form string="Session Dashboard">
|
+ <form string="Session Dashboard">
|
||||||
+ <board style="2-1">
|
+ <board style="2-1">
|
||||||
|
@ -89,6 +90,6 @@ Index: addons/openacademy/views/session_board.xml
|
||||||
+ name="Session Dashboard" parent="base.menu_reporting_dashboard"
|
+ name="Session Dashboard" parent="base.menu_reporting_dashboard"
|
||||||
+ action="open_board_session"
|
+ action="open_board_session"
|
||||||
+ sequence="1"
|
+ sequence="1"
|
||||||
+ id="menu_board_session"/>
|
+ id="menu_board_session" icon="terp-graph"/>
|
||||||
+ </data>
|
+ </data>
|
||||||
+</openerp>
|
+</openerp>
|
||||||
|
|
|
@ -33,21 +33,15 @@ This documents attempts to describe most of the installation options.
|
||||||
|
|
||||||
Good for developing modules, can be used as base for production
|
Good for developing modules, can be used as base for production
|
||||||
deployment.
|
deployment.
|
||||||
:ref:`setup/install/vcs`
|
|
||||||
Mostly has the same strengths and weaknesses as the
|
The source code can be obtained by downloading a tarball or using git.
|
||||||
:ref:`setup/install/source`, but allows (technically) simpler
|
Using git makes it easier to update, switching between multiple versions
|
||||||
switching between versions of Odoo, as well as more structured patching
|
and contribute.
|
||||||
and customisations of Odoo itself (not through custom modules): with a
|
|
||||||
standard :ref:`setup/install/source`, a custom solution has to be
|
|
||||||
implemented to keep track of patches applied to Odoo (e.g. Quilt_). With
|
|
||||||
a VCS checkout, these changes can be implemented as standard Git revisions
|
|
||||||
or a custom Git branch, and can more easily be contributed back to the
|
|
||||||
main project.
|
|
||||||
|
|
||||||
.. _setup/install/demo:
|
.. _setup/install/demo:
|
||||||
|
|
||||||
Demo_
|
Demo
|
||||||
=====
|
====
|
||||||
|
|
||||||
To simply get a quick idea of Odoo, demo_ instances are available. They are
|
To simply get a quick idea of Odoo, demo_ instances are available. They are
|
||||||
shared instances which only live for a few hours, and can be used to browse
|
shared instances which only live for a few hours, and can be used to browse
|
||||||
|
@ -57,8 +51,8 @@ Demo_ instances require no local installation, just a web browser.
|
||||||
|
|
||||||
.. _setup/install/saas:
|
.. _setup/install/saas:
|
||||||
|
|
||||||
SaaS_
|
SaaS
|
||||||
=====
|
====
|
||||||
|
|
||||||
Odoo's SaaS_ provides private instances and starts out free. It can be used to
|
Odoo's SaaS_ provides private instances and starts out free. It can be used to
|
||||||
discover and test Odoo and do non-code customizations without having to
|
discover and test Odoo and do non-code customizations without having to
|
||||||
|
@ -72,11 +66,8 @@ browser is sufficient.
|
||||||
Packaged installers
|
Packaged installers
|
||||||
===================
|
===================
|
||||||
|
|
||||||
.. Odoo provides packaged installers for Windows, deb-based distributions
|
Odoo provides packaged installers for Windows, deb-based distributions
|
||||||
.. (Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …).
|
(Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …).
|
||||||
|
|
||||||
Odoo provides packaged installers for Windows and deb-based distributions
|
|
||||||
(Debian, Ubuntu, …).
|
|
||||||
|
|
||||||
These packages automatically set up all dependencies, but may be difficult to
|
These packages automatically set up all dependencies, but may be difficult to
|
||||||
keep up-to-date.
|
keep up-to-date.
|
||||||
|
@ -84,6 +75,33 @@ keep up-to-date.
|
||||||
Official packages with all relevant dependency requirements are available on
|
Official packages with all relevant dependency requirements are available on
|
||||||
https://nightly.odoo.com.
|
https://nightly.odoo.com.
|
||||||
|
|
||||||
|
Windows
|
||||||
|
-------
|
||||||
|
|
||||||
|
* download https://nightly.odoo.com/8.0/nightly/exe/odoo_8.0.latest.exe
|
||||||
|
* run the downloaded file
|
||||||
|
|
||||||
|
.. warning:: on Windows 8, you may see a warning titled "Windows protected
|
||||||
|
your PC". Click :guilabel:`More Info` then
|
||||||
|
:guilabel:`Run anyway`
|
||||||
|
|
||||||
|
* Accept the UAC_ prompt
|
||||||
|
* Go through the various installation steps
|
||||||
|
|
||||||
|
Odoo will automatically be started at the end of the installation.
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
'''''''''''''
|
||||||
|
|
||||||
|
The :ref:`configuration file <reference/cmdline/config>` can be found at
|
||||||
|
:file:`{%PROGRAMFILES%}\\Odoo 8.0-{id}\\server\\openerp-server.conf`.
|
||||||
|
|
||||||
|
The configuration file can be edited to connect to a remote Postgresql, edit
|
||||||
|
file locations or set a dbfilter.
|
||||||
|
|
||||||
|
To reload the configuration file, restart the Odoo service via
|
||||||
|
:menuselection:`Services --> odoo server`.
|
||||||
|
|
||||||
Deb
|
Deb
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -99,10 +117,6 @@ commands as root:
|
||||||
This will automatically install all dependencies, install Odoo itself as a
|
This will automatically install all dependencies, install Odoo itself as a
|
||||||
daemon and automatically start it.
|
daemon and automatically start it.
|
||||||
|
|
||||||
.. postgres-server apparently automatically installed due to being a
|
|
||||||
recommended package, maybe install it explicitly for the purpose of this
|
|
||||||
document?
|
|
||||||
|
|
||||||
.. danger:: to print PDF reports, you must install wkhtmltopdf_ yourself:
|
.. danger:: to print PDF reports, you must install wkhtmltopdf_ yourself:
|
||||||
the version of wkhtmltopdf_ available in debian repositories does
|
the version of wkhtmltopdf_ available in debian repositories does
|
||||||
not support headers and footers so it can not be installed
|
not support headers and footers so it can not be installed
|
||||||
|
@ -167,32 +181,6 @@ When the configuration file is edited, Odoo must be restarted via SystemD:
|
||||||
|
|
||||||
$ sudo systemctl restart odoo
|
$ sudo systemctl restart odoo
|
||||||
|
|
||||||
Windows
|
|
||||||
-------
|
|
||||||
|
|
||||||
* download https://nightly.odoo.com/8.0/nightly/exe/odoo_8.0.latest.exe
|
|
||||||
* run the downloaded file
|
|
||||||
|
|
||||||
.. warning:: on Windows 8, you may see a warning titled "Windows protected
|
|
||||||
your PC". Click :guilabel:`More Info` then
|
|
||||||
:guilabel:`Run anyway`
|
|
||||||
|
|
||||||
* Accept the UAC_ prompt
|
|
||||||
* Go through the various installation steps
|
|
||||||
|
|
||||||
Odoo will automatically be started at the end of the installation.
|
|
||||||
|
|
||||||
Configuration
|
|
||||||
'''''''''''''
|
|
||||||
|
|
||||||
The :ref:`configuration file <reference/cmdline/config>` can be found at
|
|
||||||
:file:`{%PROGRAMFILES%}\\Odoo 8.0-{id}\\server\\openerp-server.conf`.
|
|
||||||
|
|
||||||
The configuration file can be edited to connect to a remote Postgresql, edit
|
|
||||||
file locations or set a dbfilter.
|
|
||||||
|
|
||||||
To reload the configuration file, restart the Odoo service via
|
|
||||||
:menuselection:`Services --> odoo server`.
|
|
||||||
|
|
||||||
.. _setup/install/source:
|
.. _setup/install/source:
|
||||||
|
|
||||||
|
@ -214,77 +202,101 @@ edit a configuration file.
|
||||||
Finally it provides greater control over the system's set up, and allows more
|
Finally it provides greater control over the system's set up, and allows more
|
||||||
easily keeping (and running) multiple versions of Odoo side-by-side.
|
easily keeping (and running) multiple versions of Odoo side-by-side.
|
||||||
|
|
||||||
The Odoo source can be downloaded from
|
There are two way to get the odoo sourcei source tarball or git.
|
||||||
|
|
||||||
|
Using git allows simpler update and easier switching between differents
|
||||||
|
versions of Odoo. It also simplifies maintaining non-module patches and
|
||||||
|
contributions. The primary drawback of git is that it is significantly larger
|
||||||
|
than a tarball as it contains the entire history of the Odoo project.
|
||||||
|
|
||||||
|
The Odoo tarball can be downloaded from
|
||||||
https://nightly.odoo.com/8.0/nightly/src/odoo_8.0-latest.tar.gz
|
https://nightly.odoo.com/8.0/nightly/src/odoo_8.0-latest.tar.gz
|
||||||
|
|
||||||
.. warning:: Windows does not handle .tar.gz archives natively, you will have
|
On windows `7-Zip <http://www.7-zip.org>`_ may be use to decompress the archive
|
||||||
to download and install `7-Zip <http://www.7-zip.org>`_ to
|
as Windows does not handle .tar.gz archives natively.
|
||||||
decompress the archive
|
|
||||||
|
The git repository is https://github.com/odoo/odoo.git and can be cloned using
|
||||||
|
the command
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ git clone https://github.com/odoo/odoo.git
|
||||||
|
|
||||||
|
|
||||||
Installing dependencies
|
Installing dependencies
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
Source installation requires manually installing dependencies, be them native
|
Source installation requires manually installing dependencies:
|
||||||
dependencies or Python libraries:
|
|
||||||
|
|
||||||
* Python, should be preinstalled on most systems. On Windows, use `the
|
* Python 2.7.
|
||||||
official Python 2.7 installer <https://www.python.org/downloads/windows/>`_.
|
|
||||||
|
|
||||||
* PostgreSQL, if you want the database to be on the same machine as Odoo
|
- on Linux, already included
|
||||||
(simplest and default)
|
- on OS X, already included
|
||||||
|
- on Windows, use `the official Python 2.7 installer
|
||||||
|
<https://www.python.org/downloads/windows/>`_.
|
||||||
|
|
||||||
|
|
||||||
|
* PostgreSQL, to use a local database
|
||||||
|
|
||||||
- on Linux, use your distribution's package
|
- on Linux, use your distribution's package
|
||||||
- on Windows, use `the official installer`_
|
|
||||||
- on OS X, `postgres.app <http://postgresapp.com>`_ is the simplest way to
|
- on OS X, `postgres.app <http://postgresapp.com>`_ is the simplest way to
|
||||||
get started
|
get started
|
||||||
|
- on Windows, use `PostgreSQL for windows`_ then add PostgreSQL's ``bin``
|
||||||
|
directory (default: ``C:\Program Files\PostgreSQL\9.3\bin``) to your
|
||||||
|
:envvar:`PATH`
|
||||||
|
|
||||||
.. todo:: create new role?
|
.. todo:: create new role?
|
||||||
|
|
||||||
* the :file:`requirements.txt` file in the source lists all the Python
|
|
||||||
dependencies
|
|
||||||
|
|
||||||
- for Windows, http://www.lfd.uci.edu/~gohlke/pythonlibs/ provides a number
|
* Python dependencies listed in the :file:`requirements.txt` file.
|
||||||
of libraries, for both pure-python and native, packaged as installers
|
|
||||||
- dependencies may be installable with the system's package manager
|
|
||||||
- pip_ can take the requirements file directly and install everything listed
|
- on Linux python dependencies may be installable with the system's package
|
||||||
in it, either globally or within a `virtual environment`_:
|
manager or using pip.
|
||||||
|
|
||||||
|
For libraries using native code (Pillow, lxml, greenlet, gevent, psycopg2) it
|
||||||
|
may be necessary to install development tools and native dependencies before
|
||||||
|
pip is able to install the dependencies themselves. These are available in
|
||||||
|
``-dev`` or ``-devel`` packages for Python, Postgres, libxml2, libxslt and
|
||||||
|
libevent. Then the dependecies can be installed using
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ pip install -r path/to/requirements.txt
|
$ pip install -r requirements.txt
|
||||||
|
|
||||||
For libraries using native code (Pillow, lxml, greenlet, gevent, psycopg2)
|
- on OS X, install the Command Line Tools (``xcode-select --install``) the
|
||||||
it may be necessary to install development tools and native dependencies
|
native dependency via your preferred package manager (macports_,
|
||||||
before pip is able to install the dependencies themselves:
|
homebrew_). Then pip can be used.
|
||||||
|
|
||||||
* Linux distributions generally require ``-dev`` or ``-devel`` packages
|
.. code-block:: console
|
||||||
for Python, Postgres, libxml2, libxslt and libevent
|
|
||||||
* for OSX, install the Command Line Tools (``xcode-select --install``) the
|
|
||||||
native dependency via your preferred package manager (macports_,
|
|
||||||
homebrew_)
|
|
||||||
* for Windows
|
|
||||||
|
|
||||||
.. danger:: you will have to remove ``python-ldap`` from the
|
$ pip install -r requirements.txt
|
||||||
requirements file, it can not be installed via pip_ on
|
|
||||||
Windows and must be installed as a precompiled binary
|
|
||||||
|
|
||||||
- install the `Visual C++ Compiler for Python 2.7`_ (and restart)
|
- on Windows you need to install some of the dependencies manually, tweak the
|
||||||
- install `PostgreSQL for windows`_ if not already done
|
requirements.txt file, then run pip to install the remaning ones.
|
||||||
- Add PostgreSQL's ``bin`` directory (default:
|
|
||||||
``C:\Program Files\PostgreSQL\9.3\bin``) to your :envvar:`PATH`
|
|
||||||
|
|
||||||
``greenlet``, ``Pillow`` and ``lxml`` are available as pre-compiled
|
Install ``psycopg`` using the installer here
|
||||||
wheels_ and trivially installed by pip_, ``gevent`` only needs the
|
http://www.stickpeople.com/projects/python/win-psycopg/
|
||||||
compiler to be installable and a local installation ``psycopg2``
|
|
||||||
|
|
||||||
.. note:: by default, Python scripts are not on the PATH in windows,
|
Install ``pip`` from http://www.lfd.uci.edu/~gohlke/pythonlibs/
|
||||||
after installing pip_ add ``C:\Python27\Scripts`` to your
|
|
||||||
:envvar:`PATH`
|
Then edit the requirements.txt file:
|
||||||
|
|
||||||
|
- remove ``psycopg`` as you already have it.
|
||||||
|
|
||||||
|
- remove the optional ``python-ldap``, ``gevent`` and ``psutil`` because they
|
||||||
|
require compilation.
|
||||||
|
|
||||||
|
- add ``pypiwin32`` because it's needed under windows.
|
||||||
|
|
||||||
|
Then use pip to install install the dependecies using the following command
|
||||||
|
from a cmd.exe prompt
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
C:\> cd \YourOdooSourcePath
|
||||||
|
C:\YourOdooSourcePath> C:\Python27\Scripts\pip.exe install -r requirements.txt
|
||||||
|
|
||||||
.. danger:: whatever the installation method, Odoo on Windows also needs
|
|
||||||
pywin32_ which is not listed in the requirements file. It can be
|
|
||||||
installed using pip_ with ``pip install pypiwin32``, or manually
|
|
||||||
by downloading the official pywin32_ installer and running it.
|
|
||||||
|
|
||||||
Running Odoo
|
Running Odoo
|
||||||
------------
|
------------
|
||||||
|
@ -305,23 +317,6 @@ Common necessary configurations are:
|
||||||
``postgres``, and Odoo forbids connecting as ``postgres``.
|
``postgres``, and Odoo forbids connecting as ``postgres``.
|
||||||
* Custom addons path beyond the defaults, to load your own modules
|
* Custom addons path beyond the defaults, to load your own modules
|
||||||
|
|
||||||
.. _setup/install/vcs:
|
|
||||||
|
|
||||||
VCS Checkout
|
|
||||||
============
|
|
||||||
|
|
||||||
The VCS Checkout installation method is similar to
|
|
||||||
:ref:`source-based installation <setup/install/source>` in most respect.
|
|
||||||
|
|
||||||
* Instead of downloading a tarball the Odoo source code is downloaded from
|
|
||||||
`the repository`_ using git_
|
|
||||||
* This simplifies the development and contributions to Odoo itself
|
|
||||||
* This also simplifies maintaining non-module patches on top of the base Odoo
|
|
||||||
system
|
|
||||||
|
|
||||||
The primary drawback of the VCS checkout method is that it is significantly
|
|
||||||
larger than a :ref:`source install <setup/install/source>` as it contains
|
|
||||||
the entire history of the Odoo project.
|
|
||||||
|
|
||||||
.. _demo: https://demo.odoo.com
|
.. _demo: https://demo.odoo.com
|
||||||
.. _EPEL: https://fedoraproject.org/wiki/EPEL
|
.. _EPEL: https://fedoraproject.org/wiki/EPEL
|
||||||
|
|
|
@ -7,7 +7,6 @@ import logging
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import platform
|
import platform
|
||||||
import psutil
|
|
||||||
import random
|
import random
|
||||||
import select
|
import select
|
||||||
import signal
|
import signal
|
||||||
|
@ -24,6 +23,7 @@ if os.name == 'posix':
|
||||||
# Unix only for workers
|
# Unix only for workers
|
||||||
import fcntl
|
import fcntl
|
||||||
import resource
|
import resource
|
||||||
|
import psutil
|
||||||
else:
|
else:
|
||||||
# Windows shim
|
# Windows shim
|
||||||
signal.SIGHUP = -1
|
signal.SIGHUP = -1
|
||||||
|
|
Loading…
Reference in New Issue