Changes between Initial Version and Version 1 of NagareInstallation


Ignore:
Timestamp:
09/23/2008 01:25:32 AM (9 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NagareInstallation

    v1 v1  
     1{{{ 
     2#!rst 
     3Nagare installation 
     4=================== 
     5 
     61. Stackless Python installation 
     7-------------------------------- 
     8 
     9The Nagare framework uses Stackless Python (version 2.5.2 or above). 
     10 
     111.1. Linux installation 
     12~~~~~~~~~~~~~~~~~~~~~~~ 
     13 
     14First, search into your Linux distribution packages if Stackless Python 2.5.2 
     15is available. 
     16 
     17Else, to install Stackless Python from its sources, to the *<STACKLESS_HOME>* 
     18directory, do: 
     19 
     20  .. code-block:: sh 
     21   
     22     cd /tmp 
     23     wget http://www.stackless.com/binaries/stackless-252-export.tar.bz2 
     24     tar jxvf stackless-252-export.tar.bz2 
     25      
     26     cd stackless-2.5.2* 
     27     ./configure --prefix=<STACKLESS_HOME> 
     28     make all 
     29     make install  
     30 
     31Note: if the <STACKLESS_HOME> is a system directory (as ``/opt`` or ``/usr/local``), 
     32you will have to be logged as root to launch the last ``make install`` command. 
     33 
     341.2. Windows installation 
     35~~~~~~~~~~~~~~~~~~~~~~~~~ 
     36 
     37To install Stackless Python on Windows, download the `dedicated installer 
     38<http://www.stackless.com/binaries/python-2.5.2-stackless.msi>`_ and launch it. 
     39 
     402. Nagare installation 
     41---------------------- 
     42 
     43The framework can be installed system-wide, where every users can used it or 
     44into a dedicated directory called a "virtual environment". 
     45 
     46Creating a virtual environment is the standard and recommended way because such 
     47installation doesn't modify the configuration of the stackless Python interpreter 
     48and doesn't require the root privileges. 
     49 
     502.1. Virtual environment installation 
     51~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     52 
     53To create a virtual environment into the *<NAGARE_HOME>* directory, download 
     54`virtualenv <http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.1.tar.gz>`_ and launch it **with Stackless Python**. 
     55 
     56On Linux: 
     57 
     58  .. code-block:: sh 
     59 
     60     cd /tmp 
     61     wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.1.tar.gz 
     62     tar zxvf virtualenv-1.1.tar.gz 
     63      
     64     <STACKLESS_HOME>/bin/python virtualenv-1.1/virtualenv.py <NAGARE_HOME> 
     65 
     66On Windows: 
     67     
     68    Manually download 
     69    `http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.1.tar.gz <http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.1.tar.gz>`_ 
     70    and extract the file ``virtualenv.py`` (you could need an archiver as ``7-zip`` or ``winrar``). 
     71 
     72    Then launch: 
     73     
     74    .. code-block:: cmd 
     75     
     76       <STACKLESS_HOME>\Scripts\python.exe virtualenv.py <NAGARE_HOME> 
     77  
     78The final step is to install the framework into this newly created virtual 
     79environment. 
     80  
     81On Linux: 
     82  
     83    .. code-block:: sh 
     84    
     85       <NAGARE_HOME>/bin/easy_install 'nagare[full]' 
     86       
     87On Windows: 
     88 
     89    .. code-block:: cmd 
     90     
     91       <NAGARE_HOME>\Scripts\easy_install.exe nagare[full] 
     92        
     932.2. System-wide installation 
     94~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     95 
     96If Stackless Python is installed on a system directory, you will need to have 
     97the root privileges. 
     98 
     99First, install ``easy_install`` by downloading 
     100`ez_setup.py <http://peak.telecommunity.com/dist/ez_setup.py>`_ and launch it 
     101**with stackless Python**. 
     102 
     103Second, install the framework on Linux: 
     104 
     105  .. code-block:: sh 
     106   
     107     <STACKLESS_HOME>/bin/easy_install 'nagare[full]' 
     108      
     109or, on Windows: 
     110 
     111  .. code-block:: cmd 
     112   
     113     <STACKLESS_HOME>\Scripts\easy_install.exe nagare[full] 
     114 
     115See the following chapter if you don't want to install the framework with all 
     116its modules. 
     117 
     1183. Installation options 
     119----------------------- 
     120 
     121The framework installation is modular. The command ``easy_install nagare`` installs 
     122only the framework core with the minimum number of features. More features,  
     123called "extras", can be installed with the syntax ``easy_install 'nagare[extra1,extra2...]'``. 
     124 
     125Currently, the available extras are: 
     126 
     127  - `debug` -- install the debug web page, displayed when an exception is raised 
     128  - `database` -- install the Python modules needed, for an application, to access relational databases 
     129  - `doc` -- install the Python modules needed to generate the framework documentation 
     130  - `test` -- install the unit tests manager 
     131   
     132  - `full` -- install all of the above extras (i.e ``easy_install 'nagare[full]'`` 
     133    is equivalent to ``easy_install 'nagare[debug,database,doc,test]'``) 
     134 
     1354. Developers framework installation 
     136------------------------------------ 
     137 
     138To work with the latest framework sources directly from its repository, first 
     139create a virtual environment into the *<NAGARE_HOME>* directory: download ``virtualenv`` 
     140and launch it **with Stackless Python**. 
     141 
     142  .. code-block:: sh 
     143 
     144     cd /tmp 
     145     wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.1.tar.gz 
     146     tar zxvf virtualenv-1.1.tar.gz 
     147      
     148     <STACKLESS_HOME>/bin/python virtualenv-1.1/virtualenv.py <NAGARE_HOME> 
     149  
     150Second, grab the framework sources from the repository: 
     151 
     152  .. code-block:: sh 
     153   
     154     cd <NAGARE_HOME> 
     155     svn co svn://www.nagare.org/trunk/nagare 
     156 
     157Third, install the framework from the sources: 
     158 
     159  .. code-block:: sh 
     160   
     161     cd nagare/core 
     162     <NAGARE_HOME>/bin/python setup.py develop 
     163     <NAGARE_HOME>/bin/easy_install 'nagare[full]'  
     164 
     165You can now work with the sources of the framework in ``<NAGARE_HOME>nagare/core/nagare`` 
     166and, when you want to update the sources from the repository, do: 
     167 
     168  .. code-block:: sh 
     169   
     170     cd <NAGARE_HOME>/nagare 
     171     svn update 
     172      
     1735. Testing the installation 
     174--------------------------- 
     175 
     176To test the installation, launch the adminstrative interface: 
     177 
     178  .. code-block:: sh 
     179   
     180     <NAGARE_HOME>/bin/nagare-admin serve admin 
     181 
     182or, in Windows: 
     183 
     184  .. code-block:: cmd 
     185   
     186     <NAGARE_HOME>\Scripts\nagare-admin.exe serve admin 
     187 
     188which must results in the following display: 
     189      
     190  .. code-block:: sh 
     191   
     192     Application 'app admin' registered as '/admin' 
     193     Application 'app admin' registered as '/' 
     194     serving on http://127.0.0.1:8080 
     195      
     196Then you can browse at http://127.0.0.1:8080/admin to look at the administrative 
     197interface. 
     198 
     199.. wikiname: NagareInstallation 
     200}}}