<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head>


<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>brainvisa-soma - How to install CubicWeb - BioProj</title>
<meta name="description" content="Redmine">
<meta name="keywords" content="issue,bug,tracker">
<link href="How_to_install_CubicWeb_files/application.css" media="all" rel="stylesheet" type="text/css">
<script src="How_to_install_CubicWeb_files/prototype.js" type="text/javascript"></script>
<script src="How_to_install_CubicWeb_files/effects.js" type="text/javascript"></script>
<script src="How_to_install_CubicWeb_files/dragdrop.js" type="text/javascript"></script>
<script src="How_to_install_CubicWeb_files/controls.js" type="text/javascript"></script>
<script src="How_to_install_CubicWeb_files/application.js" type="text/javascript"></script>
<link href="How_to_install_CubicWeb_files/jstoolbar.css" media="screen" rel="stylesheet" type="text/css">
<!--[if IE]>
    <style type="text/css">
      * html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
      body {behavior: url(/redmine/stylesheets/csshover.htc?1265974427);}
    </style>
<![endif]-->
 
<!-- page specific tags -->

  <link href="How_to_install_CubicWeb_files/scm.css" media="screen" rel="stylesheet" type="text/css">
<script src="How_to_install_CubicWeb_files/prettify.js" type="text/javascript"></script>
<link href="How_to_install_CubicWeb_files/prettify.css" media="screen" rel="stylesheet" type="text/css">
</head><body onload="prettyPrint()">
<div id="wrapper">
<div id="top-menu">
    <div id="account">
        <ul><li><a href="https://bioproj.extra.cea.fr/redmine/my/account" class="my-account">My account</a></li></ul>    </div>
    <div id="loggedas">Close you browser to logout:  <a href="https://bioproj.extra.cea.fr/redmine/users/133">brainvisa</a></div>
    <ul><li><a href="https://bioproj.extra.cea.fr/redmine/" class="home">Home</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/my/page" class="my-page">My page</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects" class="projects">Projects</a></li>
<li><a href="http://www.redmine.org/guide" class="help">Help</a></li></ul></div>
      
<div id="header">
    <div id="quick-search">
        <form action="/redmine/search/index/brainvisa-soma" method="get">
        <input name="wiki_pages" value="1" type="hidden">
        <a href="https://bioproj.extra.cea.fr/redmine/search/index/brainvisa-soma" accesskey="4">Search</a>:
        <input accesskey="f" class="small" id="q" name="q" size="20" type="text">
        </form>
        <select onchange="if (this.value != '') { window.location = this.value; }"><option value="">Jump to a project...</option><option value="" disabled="disabled">---</option><option value="/redmine/projects/brainvisa?jump=wiki">brainvisa</option><option value="/redmine/projects/brainvisa-aims?jump=wiki">  » brainvisa-aims</option><option value="/redmine/projects/brainvisa-anato?jump=wiki">  » brainvisa-anatomist</option><option value="/redmine/projects/brainvisa-axon?jump=wiki">  » brainvisa-axon</option><option value="/redmine/projects/brainvisa-axonw?jump=wiki">  » brainvisa-axon_web</option><option value="/redmine/projects/brainvisa-brainr?jump=wiki">  » brainvisa-brainrat</option><option value="/redmine/projects/brainvisa-connect?jump=wiki">  » brainvisa-connectomist</option><option value="/redmine/projects/brainvisa-corti?jump=wiki">  » brainvisa-cortical_surface</option><option value="/redmine/projects/brainvisa-data?jump=wiki">  » brainvisa-data_storage_client</option><option value="/redmine/projects/brainvisa-devel?jump=wiki">  » brainvisa-development</option><option value="/redmine/projects/brainvisa-insta?jump=wiki">  » brainvisa-installer</option><option value="/redmine/projects/brainvisa-fmri?jump=wiki">  » brainvisa-fmri</option><option value="/redmine/projects/brainvisa-nuclear?jump=wiki">  » brainvisa-nuclear_processing</option><option value="/redmine/projects/brainvisa-share?jump=wiki">  » brainvisa-share</option><option selected="selected" value="/redmine/projects/brainvisa-soma?jump=wiki">  » brainvisa-soma</option><option value="/redmine/projects/brainvisa-sulci?jump=wiki">  » brainvisa-sulci</option><option value="/redmine/projects/brainvisa-t1mri?jump=wiki">  » brainvisa-t1mri</option></select>
    </div>
    <div style="float: right; margin-right: 30px;"><a style="color: yellow; text-decoration: blink;" href="https://bioproj.extra.cea.fr/redmine/news/29"></a>
</div>
    
    <h1><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa?jump=wiki" class="root">brainvisa</a> » brainvisa-soma</h1>
    
    <div id="main-menu">
        <ul><li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma" class="overview">Overview</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/activity" class="activity">Activity</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/roadmap" class="roadmap">Roadmap</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/issues" class="issues">Issues</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/news" class="news">News</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/documents" class="documents">Documents</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/wiki" class="wiki selected">Wiki</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/files" class="files">Files</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/repository" class="repository">Repository</a></li>
<li><a href="https://bioproj.extra.cea.fr/redmine/ezfaq/index/brainvisa-soma" class="ezfaq">FAQ</a></li></ul>
    </div>
</div>

<div class="" id="main">
    <div id="sidebar">        
        
  <h3>Wiki</h3>

<a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/wiki">Start page</a><br>
<a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/wiki/Page_index">Index by title</a><br>
<a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/wiki/Date_index">Index by date</a><br>


        
    </div>
    
    <div id="content">
                                
        <div class="contextual">


<span id="watcher"><a class="icon icon-fav-off" href="https://bioproj.extra.cea.fr/redmine/watchers/watch?object_id=277&object_type=wiki_page&replace=watcher" onclick="new Ajax.Request('/redmine/watchers/watch?object_id=277&object_type=wiki_page&replace=watcher', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('71+cO13Pm+F9vbK3jUXBdkiMPiXCDIHLx4pdhFcZOxo=')}); return false;">Watch</a></span>






<a href="https://bioproj.extra.cea.fr/redmine/projects/brainvisa-soma/wiki/How_to_install_CubicWeb/history" class="icon icon-history">History</a>
</div>





<div class="wiki">
  <h1 id="How-to-install-CubicWebhttpwwwcubicwebcom">How to install <a href="http://www.cubicweb.com/" class="external">CubicWeb</a><a href="#How-to-install-CubicWebhttpwwwcubicwebcom" class="wiki-anchor">¶</a></h1>


        <p>On some systems, there are packages for CubicWeb (see <a class="external" href="http://www.cubicweb.org/doc/en/admin/setup">http://www.cubicweb.org/doc/en/admin/setup</a>). But if no package is available or the package are broken, you may find some useful information here.</p>


        <h2 id="Install-dependencies-for-using-CubicWeb">Install dependencies for using CubicWeb<a href="#Install-dependencies-for-using-CubicWeb" class="wiki-anchor">¶</a></h2>


        <p>These
dependencies are valid if you use only SQlite databases. You should
also consider installing Postgresql and the corresponding Python
bindings because some CubicWeb features are not available with SQlite
databases (such as full text research).</p>


<blockquote>

<strong>Ubuntu</strong> (tested on Ubuntu 9.10 karmic)<br><pre>sudo apt-get install python-psyco python-docutils gettext pyro \
                    python-twisted-web2 graphviz yapps2 python-lxml</pre><br><strong>Mandriva</strong> <font color="red">On Mandriva 2008.0 I did not found the following packages: <strong>pyro, python-twisted-web2, yapps2</strong>. </font><br><pre>su -
urpmi python-psyco python-docutils gettext graphviz python-lxml</pre><br>Some
packages (such as twisted can be installed vie easy_install). However,
python-twisted-web2 and yapps2 may not be found by easy_install. I have
been able to "install" them (on a customized Python 2.5 runnig on
Mandriva 2008) by copying the corresponding directories from an Ubuntu
9.10 install. This is not very clean but up to now, it works: <ul>
        <li>/usr/share/pyshared/twisted/web2 -->
python_install_dir/lib/python2.5/site-packages/Twisted-9.0.0-py2.5-linux-i686.egg/twisted</li>
                <li>/usr/lib/pymodules/python2.6/yapps --> python_install_dir/lib/python2.5/site-packages</li>
        </ul>


</blockquote>

        <h2 id="Download-and-install-CubicWeb">Download and install CubicWeb<a href="#Download-and-install-CubicWeb" class="wiki-anchor">¶</a></h2>


        <p>This installation can be done by an administrator in a directory shared by all users.</p>


        <p>Install Mercurial and its forest extension for downloading CubicWeb sources</p>


<blockquote>

        <p><strong>Ubuntu</strong><br></p><pre>sudo apt-get install mercurial
sudo hg clone http://hg.akoha.org/hgforest /usr/local/hgforest</pre><strong>Mandriva</strong><br><pre>su -
urpmi mercurial
hg clone http://hg.akoha.org/hgforest /usr/local/hgforest</pre>


</blockquote>

        <p>Enable forest extension for a user<br></p><pre>cat > "$HOME/.hgrc" << THE_END
[extensions]
forest=/usr/local/hgforest/forest.py
THE_END</pre>


        <p>Download CubicWeb<br></p><pre>CUBICWEB_DIR="/usr/local/cubicweb" 
sudo hg fclone http://www.logilab.org/hg/forests/cubicweb "$CUBICWEB_DIR" 
# Switch to stable version of CubicWeb
cd "${CUBICWEB_DIR}" 
sudo hg fup stable
</pre>


        <p>Patch CubicWeb for internationalization. In some
non-english systems, I noticed an error that is due to an invalid
import of MI_REL_TRIGGERS in cubes/i18ncontent/__init__.py. To correct
this, download <a href="https://bioproj.extra.cea.fr/redmine/attachments/download/735" class="attachment">patch_cubes_i18ncontent.diff</a> and apply the patch with the following commands:<br></p><pre>cd "$CUBICWEB_DIR/cubes/i18ncontent" 
sudo hg import patch_cubes_i18ncontent.diff</pre>


        <p>Patch CubicWeb for Python 2.6. CubicWeb sources must be modified in order to work with Python 2.6. You can download <a href="https://bioproj.extra.cea.fr/redmine/attachments/download/734" class="attachment">patch_logilab_common.diff</a> and apply the patch with the following commands:<br></p><pre>cd "$CUBICWEB_DIR/logilab/common" 
sudo hg import patch_logilab_common.diff</pre>


        <p>The
following step is optional but can speed-up CubicWeb queries. It comes
from one guy in LogiLab who helped me in making CubicWeb work on my
laptop.<br></p><pre>sudo apt-get install build-essential python-dev libgecode-dev
cd "$CUBICWEB_DIR/rql" 
python setup.py build_ext --inplace</pre>


        <h2 id="Test-that-main-command-is-working">Test that main command is working<a href="#Test-that-main-command-is-working" class="wiki-anchor">¶</a></h2>


<pre>export PATH="$PATH:$CUBICWEB_DIR/cubicweb/bin" 
export PYTHONPATH="$PYTHONPATH:$CUBICWEB_DIR" 
cubicweb-ctl list</pre><br>This should show something like this:<br><pre>CubicWeb 3.5.12 (user mode)

Available configurations:
* repository
    standalone RQL server

Available cubes (/opt/cubicweb/cubes):
* accounting   0.1.0
* addressbook  1.5.0
* apycot       1.6.0
* basket       1.2.0
* blog         1.6.2
* book         0.3.0
* calendar     0.2.1
* card         [missing cube information]
* codenaf      0.1.0
* comment      1.5.0
* company      0.3.0
* conference   0.2.0
* dailymotion  0.1.0
* dbpedia      0.1.0
* document     0.4.0
* drh          0.16.0
* email        1.6.0
* event        1.2.0
* expense      0.5.0
* file         1.7.0
* folder       1.6.0
* forge        1.3.3
* forgotpwd    0.1.0
* fresh        0.5.0
* i18ncontent  [missing cube information]
* intranet     0.16.0
* invoice      0.5.0
* keyword      1.5.0
* link         1.4.0
* mailinglist  1.4.0
* nosylist     0.2.0
* person       1.5.0
* pyrons       0.1.0
* registration 0.2.1
* rememberme   0.1.0
* shopcart     0.1.0
* skillmat     0.6.0
* skm          0.2.1
* sysinfo      0.11.0
* tag          1.5.3
* task         1.3.0
* testcard     0.1.2
* timeseries   0.1.0
* timesheet    0.1.2
* tracker      1.3.1
* vcsfile      1.0.13
* workcase     0.5.1
* workorder    0.6.1
* zone         1.2.0

No instance available: registry path /root/etc/cubicweb.d/ doesn't exist</pre>
</div>


<div class="attachments">

<p><a href="https://bioproj.extra.cea.fr/redmine/attachments/734/patch_logilab_common.diff" class="icon icon-attachment">patch_logilab_common.diff</a> - Patch fixing a date formatting string that raises an exception with Python 2.6
  <span class="size">(831 Bytes)</span>
  
  
    <span class="author">Cointepas, Yann, 02/10/2010 12:59 pm</span>
  
  </p>

<p><a href="https://bioproj.extra.cea.fr/redmine/attachments/735/patch_cubes_i18ncontent.diff" class="icon icon-attachment">patch_cubes_i18ncontent.diff</a> - Fix bad import in CubicWeb
  <span class="size">(657 Bytes)</span>
  
  
    <span class="author">Cointepas, Yann, 02/10/2010 03:19 pm</span>
  
  </p>

</div>












        
                                <div style="clear: both;"></div>
    </div>
</div>

<div id="ajax-indicator" style="display: none;"><span>Loading...</span></div>
        
<div id="footer">
    Powered by <a href="http://www.redmine.org/">Redmine</a> © 2006-2010 Jean-Philippe Lang
</div>
</div>

</body></html>