# HG changeset patch # User Sylvain Thénault # Date 1291219704 -3600 # Node ID a872c391ef867bc6eea03bc89c70cdaebd67bf92 # Parent d3ea8ca2bf61915ed299ae9a1fcfd239c530769a# Parent 43a38c093f6f22a59df5f121eb29b25985077f42 backport oldstable diff -r d3ea8ca2bf61 -r a872c391ef86 devtools/testlib.py --- a/devtools/testlib.py Tue Nov 30 23:25:55 2010 +0100 +++ b/devtools/testlib.py Wed Dec 01 17:08:24 2010 +0100 @@ -39,6 +39,7 @@ from logilab.common.umessage import message_from_string from logilab.common.decorators import cached, classproperty, clear_cache from logilab.common.deprecation import deprecated, class_deprecated +from logilab.common.shellutils import getlogin from cubicweb import ValidationError, NoSelectableObject, AuthenticationError from cubicweb import cwconfig, devtools, web, server @@ -223,13 +224,7 @@ # set default-dest-addrs to a dumb email address to avoid mailbox or # mail queue pollution config.global_set_option('default-dest-addrs', ['whatever']) - try: - send_to = '%s@logilab.fr' % os.getlogin() - # AttributeError since getlogin not available under all platforms - except (OSError, AttributeError): - send_to = '%s@logilab.fr' % (os.environ.get('USER') - or os.environ.get('USERNAME') - or os.environ.get('LOGNAME')) + send_to = '%s@logilab.fr' % getlogin() config.global_set_option('sender-addr', send_to) config.global_set_option('default-dest-addrs', send_to) config.global_set_option('sender-name', 'cubicweb-test') diff -r d3ea8ca2bf61 -r a872c391ef86 doc/book/en/admin/setup.rst --- a/doc/book/en/admin/setup.rst Tue Nov 30 23:25:55 2010 +0100 +++ b/doc/book/en/admin/setup.rst Wed Dec 01 17:08:24 2010 +0100 @@ -8,9 +8,25 @@ Installation of `Cubicweb` and its dependencies ----------------------------------------------- -|cubicweb| is packaged for Debian and Ubuntu, but can be installed from source -using a tarball or the Mercurial version control system. +|cubicweb| is packaged for `Debian and Ubuntu`_, is `pip installable`_ and +`easy_install installable`_. It can be installed from source using a tarball_ +or the `Mercurial version control system`_ . Windows user may want to check the +`Windows Installation`_ section. + +Also, since version 3.9, can be safely installed, used and contained inside a +`virtualenv`_. + +.. _`Debian and Ubuntu` : DebianInstallation_ +.. _`pip installable`: PipInstallation_ +.. _`easy_install installable`: EasyInstallInstallation_ +.. _tarball: TarballInstallation_ +.. _`Mercurial version control system`: MercurialInstallation_ +.. _`Windows Installation`: WindowsInstallation_ +.. _`virtualenv`: http://pypi.python.org/pypi/virtualenv + + +.. file:///home/pyves/tmp/cwdoc/html/admin/setup.html#pipinstallation .. _DebianInstallation: @@ -44,7 +60,15 @@ `cubicweb-dev` installs the development environment allowing you to develop new cubes. -There is also a wide variety of cubes listed on the `CubicWeb.org Forge`_ +.. note:: + + `cubicweb-dev` will install basic sqlite support. You can easily setup + `cubicweb with other database`_ using the following virtual packages : + `cubicweb-postgresql-support` contains necessary dependency for using + `cubicweb with postgresql datatabase`_ and `cubicweb-mysql-support` contains + necessary dependency for using `cubicweb with mysql database`_ . + +There is also a wide variety of :ref:`cubes ` listed on the `CubicWeb.org Forge`_ available as debian packages and tarball. The repositories are signed with `Logilab's gnupg key`_. To avoid warning on @@ -57,6 +81,9 @@ .. _`Logilab's gnupg key`: http://ftp.logilab.org/dists/logilab-dists-key.asc .. _`CubicWeb.org Forge`: http://www.cubicweb.org/project/ +.. _`cubicweb with other database`: DatabaseInstallation_ +.. _`cubicweb with postgresql datatabase` : PostgresqlConfiguration_ +.. _`cubicweb with mysql database` : MySqlConfiguration_ .. _PipInstallation: @@ -64,25 +91,84 @@ Installation with pip ````````````````````` -|cubicweb| and its cubes have been pip_ installable since version 3.8. Search +pip_ is a smart python utility that lets you automatically download, build, +install, and manage python packages and their dependencies. + +|cubicweb| and its cubes have been pip_ installable since version 3.9. Search for them on pypi_:: pip install cubicweb + pip install cubicweb-blog + +.. note:: + + Pip is the recommended way to install |cubicweb| if there is no binary + package available on your system or you want to install it inside a + `virtualenv`_. However pip doesn't install binary package and may require + several compilation steps while installing |cubicweb| dependencies. If you + don't have a compilation environment you should use `easy_install + installation`_ to install |cubicweb|. + + Once, |cubicweb| is installed, this limitation doesn't apply when installing + cubes. + .. _pip: http://pypi.python.org/pypi/pip .. _pypi: http://pypi.python.org/pypi?%3Aaction=search&term=cubicweb +.. _`easy_install installation`: EasyInstallInstallation_ -.. _SourceInstallation: .. warning:: - This method may still have hiccups. If it does not work for you, - please consider installing from version control system - (:ref:`MercurialInstallation`). + |cubicweb| depends upon the `lxml` python module. This module contains ``C`` + code that must be compiled. To successfully install |cubicweb| with pip, you + must either have an environment ables to compile Python ``C`` extensions or + preinstall lxml from a binary package. + +.. note:: + + For better performance the setup processor will compile a ``C`` extension for + the :ref:`RQL ` language if you have an environment ables to compile + Python ``C`` extensions and the `gecode library`_. Otherwise, a pure python + alternative will be used for degraded performance. + +.. _`gecode library`: http://www.gecode.org/ +.. _`easy_install`: http://packages.python.org/distribute/easy_install.html + + +.. _EasyInstallInstallation: + +Installation with EasyInstall +`````````````````````````````` + +.. note:: + + We don't recommend the use of `easy_install` and setuptools in the generic + case. However as easy_install is currently the sole pure python package + system that support binary installation. Using `easy_install` is currently + the easiest way to install |cubicweb| when you don't have a compilation + environment set-up or Debian based distribution. + + +|cubicweb| is easy_install_ installable for version 3.9:: + + easy_install cubicweb + +.. warning:: + + Cubes are **not** is easy_install_ installable. But they are + `pip installable`_ + + + + +.. _SourceInstallation: Install from source ``````````````````` +.. _TarballInstallation: + You can download the archive containing the sources from our `ftp site`_ at:: http://ftp.logilab.org/pub/cubicweb/ @@ -98,7 +184,7 @@ You can keep up to date with on-going development by using Mercurial:: - hg clone http://www.logilab.org/hg/forests/cubicweb + hg clone http://hg.logilab.org/cubicweb See :ref:`MercurialPresentation` for more details about Mercurial. @@ -417,7 +503,7 @@ MySql configuration ``````````````````` -Yout must add the following lines in ``/etc/mysql/my.cnf`` file:: +You must add the following lines in ``/etc/mysql/my.cnf`` file:: transaction-isolation=READ-COMMITTED default-storage-engine=INNODB @@ -471,7 +557,7 @@ Pyro configuration ------------------ -If you want to use Pyro to access your instance remotly, or to have multi-source +If you want to use Pyro to access your instance remotely, or to have multi-source or distributed configuration, it is required to have a Pyro name server running on your network. By default it is detected by a broadcast request, but you can specify a location in the instance's configuration file. diff -r d3ea8ca2bf61 -r a872c391ef86 doc/book/en/annexes/rql/index.rst --- a/doc/book/en/annexes/rql/index.rst Tue Nov 30 23:25:55 2010 +0100 +++ b/doc/book/en/annexes/rql/index.rst Wed Dec 01 17:08:24 2010 +0100 @@ -1,3 +1,5 @@ +.. _RQLChapter + Relation Query Language (RQL) =============================