Commit de1dda0e authored by Olivier Cros's avatar Olivier Cros

Adding Neo buildout installation files

To allow Neo to be installed on a machine through buildout, we must define
buildout.cfg file. We added this fils to make it possible to set up a neo buildout on a machine
directly with repository sources. It is now possible to install neo on a computer
just by using buildout, linked to neo eggs.

Buildout docs

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2659 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 96e01907
##########################################
########### HOW TO INSTALL NEO ###########
##########################################
###########
## Intro ##
###########
Welcome in the neo installation tutorial. This will learn to you how to install
and configure neo on your own computer.
There's currently three types of possible installations
- Quick installation from buildout (1)
- Installation from source (3 then 1)
#############
## Summary ##
#############
0. Requirements
1. Quick installation
2. Running tests
3. Building neo eggs
4. Common errors
######################
### 0.Requirements ###
######################
In order to install neo services on your computer, you'll need the following
requirements :
- Linux 2.6 or higher ( This tutorial has been tested for Mandriva 2010 )
- python2.4 or higher
- ctypes (http://python.net/crew/theller/ctypes/) (If you're using python2.5 or
higher, ctypes is directly included with python)
- mock (http://python-mock.sourceforge.net/) (Only if you plan to make the
neo tests)
############################
### 1.Quick installation ###
############################
You're a neo-newbie ? You don't need neo sources ? You want a full version and
not just one or two modules ? Or, more commonly, you're in a hurry ? So type
the following commands :
$ svn checkout https//svn.erp5.org/repos/neo/trunk/buildout/software-profiles/neo.cfg
When your bootstrap's done, check that you've got bin/buildout script. Then
Edit your buildout.cfg file, and delete all the neo-eggs which corresponds
to the parts you don't need. Then run :
$ cd neo/trunk/eggs
$ ./makeeggs
$ cd ../buildout/software-profiles
$ python -S -c 'import urllib;print urllib.urlopen("http://svn.zope.org/' \
'*checkout*''/zc.buildout/trunk/bootstrap/bootstrap.py").read()' | python -S -
$ bin/buildout
Congratulations, neo's installation is over ! You can now launch the different
services you installed with typing bin/<neo_script>.
#########################
### 2. Running tests ###
#########################
This part is recommended for experienced users, who already installed all other
neo parts, and could manage neo pretty easily.
Export your path to set up your environment:
$ export $PATH=$PATH:<download_neo>/trunk/bin
Add it to your neo installation :
$ bin/buildout -Nvv
Run neo tests :
$ bin/neotestrunner -fzu (functional, unit tests and zodb tests)
If this returns no errors or fails, it means that it's over for you ! Neo's
correctly installed on your machine, congratulations !
#############################
### 3. Building neo eggs ###
#############################
This part is recommended for experienced users, who wants to make a neo
installation from beginning. It explains how to make eggs from a
precise neo part, instead of eggifying the whole project.
Each part of neo (lib, admin, master, storage, neoctl, client) has its own
setup.py file, which is located on <download_neo>/trunk/setup_files, ans which
allows to build the linked egg. See VI. Setup files to check which setup.py
file you need. Then execute the following commands :
$ svn checkout https://svn.erp5.org/repos/neo/trunk
$ cd <download_neo>/trunk/neo
(setup_cmn.py is the main part of neo, needed by all other processes)
$ python setup.*.py bdist_egg
Check in your trunk/bdist folder that you have an egg for each part of neo you
want to install. If it's ok, then go on to part II.
########################
### 4. Common errors ###
########################
Problem : The egg I need is not present in my trunk/bdist folder.
Solution : Select the correct setup_<part>.py in trunk/setup_files
Problem: bin/buildout is not present
Solution: Launch the bootstrap command
Problem : bootstrap command is not working
Solution : Try to use another python version
Tests errors :
'neoadmin' not found
'neomaster' not found
'neostorage' not found
Solution :
Check your path and remember to export <download_neo>/trunk/bin to it
How to eggify Mock projet (Neo dependency)
- Download source http://python-mock.sourceforge.net/ in a mock/ folder
- Write setup.py file
from setuptools import setup, find_packages
setup(
name='mock',
version='1.0',
description='Manipulate mock objects for NEO',
author='Dave Kirby',
author_email='test@admin.com',
url='http://python-mock.sourceforge.net/',
license="BSD",
packages=find_packages(),
package_dir={'mock': 'mock'},
zip_safe=False,
)
- Launch python setup.py bdist_egg
The created egg is in dist/ folder.
#Neo global config file - partitioned
[buildout]
# extends-cache = extends-cache
parts =
neoinstall
find-links =
../../eggs/
[neoinstall]
recipe = zc.recipe.egg
interpreter = python
scripts =
neotestrunner
neomigrate
neomaster
neoadmin
neostorage
neoctl
eggs =
neotests
neoadmin
neoctl
neostorage
neoclient
neomaster
zope.testing
#!/bin/sh
PYTHON=python2.6
INSTALL_DIR=eggs/
cd dirname $0/..
case "$1" in
"develop")
MODE=develop
PYTHONPATH=$PYTHONPATH:$INSTALL_DIR;;
*) MODE=bdist_egg ;;
esac
$PYTHON setup_client.py $MODE --dist-dir=$INSTALL_DIR
$PYTHON setup_common.py $MODE --dist-dir=$INSTALL_DIR
$PYTHON setup_admin.py $MODE --dist-dir=$INSTALL_DIR
$PYTHON setup_ctl.py $MODE --dist-dir=$INSTALL_DIR
$PYTHON setup_tests.py $MODE --dist-dir=$INSTALL_DIR
$PYTHON setup_storage.py $MODE --dist-dir=$INSTALL_DIR
$PYTHON setup_master.py $MODE --dist-dir=$INSTALL_DIR
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment