From 84419fcd0ac153c0bfa4c1d9d78a02cf19291d9f Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Wed, 7 Jan 2015 02:39:40 +0100 Subject: [PATCH] [IMP] doc: update windows source code instructions remove psutil dependency under windows reverts documentation commit 96aba067a875cda874b76eb843b39a619c539846 because it prevent sphinx build merge setup source code and vcs checkout sections and simplify wording simplify source installation instructions for windows --- doc/howtos/backend/exercise-dashboard | 3 +- doc/setup/install.rst | 217 +++++++++++++------------- openerp/service/server.py | 2 +- 3 files changed, 109 insertions(+), 113 deletions(-) diff --git a/doc/howtos/backend/exercise-dashboard b/doc/howtos/backend/exercise-dashboard index 4e3e563f450..bf175edc7d3 100644 --- a/doc/howtos/backend/exercise-dashboard +++ b/doc/howtos/backend/exercise-dashboard @@ -54,6 +54,7 @@ Index: addons/openacademy/views/session_board.xml + + Session Dashboard Form + board.board ++ form + +
+ @@ -89,6 +90,6 @@ Index: addons/openacademy/views/session_board.xml + name="Session Dashboard" parent="base.menu_reporting_dashboard" + action="open_board_session" + sequence="1" -+ id="menu_board_session"/> ++ id="menu_board_session" icon="terp-graph"/> + + diff --git a/doc/setup/install.rst b/doc/setup/install.rst index f4758c1281f..9b75d3f4bc2 100644 --- a/doc/setup/install.rst +++ b/doc/setup/install.rst @@ -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 deployment. -:ref:`setup/install/vcs` - Mostly has the same strengths and weaknesses as the - :ref:`setup/install/source`, but allows (technically) simpler - switching between versions of Odoo, as well as more structured patching - 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. + + The source code can be obtained by downloading a tarball or using git. + Using git makes it easier to update, switching between multiple versions + and contribute. .. _setup/install/demo: -Demo_ -===== +Demo +==== 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 @@ -57,8 +51,8 @@ Demo_ instances require no local installation, just a web browser. .. _setup/install/saas: -SaaS_ -===== +SaaS +==== 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 @@ -72,11 +66,8 @@ browser is sufficient. Packaged installers =================== -.. Odoo provides packaged installers for Windows, deb-based distributions -.. (Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …). - -Odoo provides packaged installers for Windows and deb-based distributions -(Debian, Ubuntu, …). +Odoo provides packaged installers for Windows, deb-based distributions +(Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …). These packages automatically set up all dependencies, but may be difficult to keep up-to-date. @@ -84,6 +75,33 @@ keep up-to-date. Official packages with all relevant dependency requirements are available on 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 ` 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 --- @@ -99,10 +117,6 @@ commands as root: This will automatically install all dependencies, install Odoo itself as a 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: the version of wkhtmltopdf_ available in debian repositories does 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 -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 ` 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: @@ -214,77 +202,101 @@ edit a configuration file. 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. -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 -.. warning:: Windows does not handle .tar.gz archives natively, you will have - to download and install `7-Zip `_ to - decompress the archive +On windows `7-Zip `_ may be use to decompress the archive +as Windows does not handle .tar.gz archives natively. + +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 ----------------------- -Source installation requires manually installing dependencies, be them native -dependencies or Python libraries: +Source installation requires manually installing dependencies: -* Python, should be preinstalled on most systems. On Windows, use `the - official Python 2.7 installer `_. +* Python 2.7. -* PostgreSQL, if you want the database to be on the same machine as Odoo - (simplest and default) + - on Linux, already included + - on OS X, already included + - on Windows, use `the official Python 2.7 installer + `_. + + +* PostgreSQL, to use a local database - on Linux, use your distribution's package - - on Windows, use `the official installer`_ - on OS X, `postgres.app `_ is the simplest way to 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? -* 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 - 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 - in it, either globally or within a `virtual environment`_: +* Python dependencies listed in the :file:`requirements.txt` file. + + + - on Linux python dependencies may be installable with the system's package + 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 - $ pip install -r path/to/requirements.txt + $ pip install -r requirements.txt - 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: + - on OS X, install the Command Line Tools (``xcode-select --install``) the + native dependency via your preferred package manager (macports_, + homebrew_). Then pip can be used. - * Linux distributions generally require ``-dev`` or ``-devel`` packages - 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 + .. code-block:: console - .. danger:: you will have to remove ``python-ldap`` from the - requirements file, it can not be installed via pip_ on - Windows and must be installed as a precompiled binary + $ pip install -r requirements.txt - - install the `Visual C++ Compiler for Python 2.7`_ (and restart) - - install `PostgreSQL for windows`_ if not already done - - Add PostgreSQL's ``bin`` directory (default: - ``C:\Program Files\PostgreSQL\9.3\bin``) to your :envvar:`PATH` + - on Windows you need to install some of the dependencies manually, tweak the + requirements.txt file, then run pip to install the remaning ones. - ``greenlet``, ``Pillow`` and ``lxml`` are available as pre-compiled - wheels_ and trivially installed by pip_, ``gevent`` only needs the - compiler to be installable and a local installation ``psycopg2`` + Install ``psycopg`` using the installer here + http://www.stickpeople.com/projects/python/win-psycopg/ - .. note:: by default, Python scripts are not on the PATH in windows, - after installing pip_ add ``C:\Python27\Scripts`` to your - :envvar:`PATH` + Install ``pip`` from http://www.lfd.uci.edu/~gohlke/pythonlibs/ + + 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 ------------ @@ -305,23 +317,6 @@ Common necessary configurations are: ``postgres``, and Odoo forbids connecting as ``postgres``. * 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 ` 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 ` as it contains -the entire history of the Odoo project. .. _demo: https://demo.odoo.com .. _EPEL: https://fedoraproject.org/wiki/EPEL diff --git a/openerp/service/server.py b/openerp/service/server.py index 85fb1eea650..0ec039e83ad 100644 --- a/openerp/service/server.py +++ b/openerp/service/server.py @@ -7,7 +7,6 @@ import logging import os import os.path import platform -import psutil import random import select import signal @@ -24,6 +23,7 @@ if os.name == 'posix': # Unix only for workers import fcntl import resource + import psutil else: # Windows shim signal.SIGHUP = -1