[IMP] directory cleanups, moved historical cruft into history
bzr revid: al@openerp.com-20110926005444-a7vqjb05vep7xbvj
12
MANIFEST.in
|
@ -1,18 +1,12 @@
|
|||
include rpminstall_sh.txt # TODO do we need this file ?
|
||||
include README
|
||||
include LICENSE
|
||||
include MANIFEST.in
|
||||
include setup.nsi
|
||||
include setup.cfg
|
||||
#include openerp/server.cert
|
||||
#include openerp/server.pkey
|
||||
#include openerp/gpl.txt
|
||||
include man/openerp-server.1
|
||||
include man/openerp_serverrc.5
|
||||
recursive-include pixmaps *bmp *ico *png
|
||||
include setup_rpm.sh
|
||||
recursive-include win32 *.py *.bat
|
||||
recursive-include openerp *css *csv *html *png *po *pot
|
||||
recursive-include openerp *rml *rng *sql *sxw *xml *xsl *yml
|
||||
recursive-include openerp *css *csv *html *png *po *pot *rml *rng *sql *sxw *xml *xsl *yml
|
||||
graft install
|
||||
graft debian
|
||||
graft doc
|
||||
global-exclude *pyc *~ # Exclude possible garbage from previous graft.
|
||||
|
|
155
README
|
@ -1,17 +1,138 @@
|
|||
About OpenERP
|
||||
---------------
|
||||
|
||||
OpenERP is a free Enterprise Resource Planning and Customer Relationship
|
||||
Management software. It is mainly developed to meet changing needs.
|
||||
|
||||
The main functional features are: CRM & SRM, analytic and financial accounting,
|
||||
double-entry stock management, sales and purchases management, tasks automation,
|
||||
help desk, marketing campaign, ... and vertical modules for very specific
|
||||
businesses.
|
||||
|
||||
Technical features include a distributed server, flexible workflows, an object
|
||||
database, dynamic GUIs, customizable reports, NET-RPC and XML-RPC interfaces, ...
|
||||
|
||||
For more information, please visit:
|
||||
http://www.openerp.com
|
||||
|
||||
About OpenERP
|
||||
-------------
|
||||
|
||||
OpenERP is a free Enterprise Resource Planning and Customer Relationship
|
||||
Management software. It is mainly developed to meet changing needs.
|
||||
|
||||
The main functional features are: CRM & SRM, analytic and financial accounting,
|
||||
double-entry stock management, sales and purchases management, tasks automation,
|
||||
help desk, marketing campaign, ... and vertical modules for very specific
|
||||
businesses.
|
||||
|
||||
Technical features include a distributed server, flexible workflows, an object
|
||||
database, dynamic GUIs, customizable reports, NET-RPC and XML-RPC interfaces, ...
|
||||
|
||||
For more information, please visit:
|
||||
http://www.openerp.com
|
||||
|
||||
OpenERP Quick Installation Guide
|
||||
---------------------------------
|
||||
|
||||
This file contains a quick guide to configure and install the OpenERP server.
|
||||
|
||||
Required dependencies:
|
||||
---------------------
|
||||
|
||||
You need the following software installed:
|
||||
|
||||
* Python 2.5 or 2.6
|
||||
* Postgresql 8.2 or above
|
||||
* Psycopg2 python module
|
||||
* Reportlab pdf generation library for python
|
||||
* lxml python module
|
||||
* pytz python module
|
||||
* PyYaml python module (install with: easy_install PyYaml)
|
||||
|
||||
Some dependencies are only required for specific purposes:
|
||||
|
||||
for rendering workflows graphs, you need:
|
||||
* graphviz
|
||||
* pyparsing
|
||||
|
||||
For Luxembourg localization, you also need:
|
||||
* pdftk (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/)
|
||||
|
||||
for generating reports using non .jpg images, you need:
|
||||
* Python Imaging Library for python
|
||||
|
||||
For Debian-based distributions, the required packages can be installed with the
|
||||
following command:
|
||||
|
||||
#> apt-get install -y postgresql graphviz python-psycopg2 python-lxml python-tz python-imaging
|
||||
|
||||
For Fedora
|
||||
if they are not installed, install:
|
||||
python and postgresql
|
||||
|
||||
uses yum or you can recover required packages on fedora web site in "core" or "extra" repository :
|
||||
postgresql-python
|
||||
python-lxml
|
||||
python-imaging
|
||||
python-psycopg2
|
||||
python-reportlab
|
||||
graphviz
|
||||
You can find pyparsing at http://pyparsing.sourceforge.net/
|
||||
|
||||
1. Check that all the required dependencies are installed.
|
||||
|
||||
2. Launch the program "python ./bin/openerp-server.py -r db_user -w db_password --db_host 127.0.0.1".
|
||||
See the man page for more information about options.
|
||||
|
||||
3. Connect to the server using the GUI client. And follow the instructions to create a new database.
|
||||
|
||||
Installation Steps
|
||||
------------------
|
||||
|
||||
1. Check that all the required dependencies are installed.
|
||||
|
||||
2. Create a postgresql database.
|
||||
|
||||
The default database name is "terp". If you want to use another name, you
|
||||
will need to provide it when launching the server (by using the commandline
|
||||
option --database).
|
||||
|
||||
To create a postgresql database named "terp" using the following command:
|
||||
$ createdb --encoding=UNICODE terp
|
||||
|
||||
If it is the first time you use postgresql you might need to create a new user
|
||||
to the postgres system using the following commands (where myusername is your
|
||||
unix user name):
|
||||
|
||||
$ su -
|
||||
# su - postgres
|
||||
$ createuser openerp
|
||||
Shall the new user be allowed to create databases? (y/n) y
|
||||
Shall the new user be allowed to create more new users? (y/n) y
|
||||
CREATE USER
|
||||
$ logout
|
||||
# logout
|
||||
|
||||
3. Launch service daemon by "service openerp-server start".
|
||||
|
||||
The first time it is run, the server will initialise the database with all the default values.
|
||||
|
||||
4. Connect to the server using the GUI client.
|
||||
|
||||
There are two accounts by default:
|
||||
* login: admin, password:admin
|
||||
* login: demo, password:demo
|
||||
|
||||
Some instructions to use setup.py for a user-install.
|
||||
This file should/will be moved on a proper documentation place later.
|
||||
|
||||
|
||||
- Possibly clean any left-over of the previous build.
|
||||
> rm -rf dist openerp_server.egg-info
|
||||
|
||||
- Possibly copy the addons in the server if we want them to be packaged
|
||||
together:
|
||||
> rsync -av --delete \
|
||||
--exclude .bzr/ \
|
||||
--exclude .bzrignore \
|
||||
--exclude /__init__.py \
|
||||
--exclude /base \
|
||||
--exclude /base_quality_interrogation.py \
|
||||
<path-to-addons> openerp/addons
|
||||
|
||||
- Create the user-local directory where we want the package to be installed:
|
||||
> mkdir -p /home/openerp/openerp-tmp/lib/python2.6/site-packages/
|
||||
|
||||
- Use --prefix to specify where the package is installed and include that
|
||||
place in PYTHONPATH:
|
||||
> PYTHONPATH=/home/openerp/openerp-tmp/lib/python2.6/site-packages/ \
|
||||
python setup.py install --prefix=/home/openerp/openerp-tmp
|
||||
|
||||
- Run the main script, again specifying the PYTHONPATH:
|
||||
> PYTHONPATH=/home/openerp/openerp-tmp/lib/python2.6/site-packages/ \
|
||||
/home/openerp/openerp-tmp/bin/openerp-server
|
||||
|
||||
|
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -245,9 +245,7 @@ class res_company(osv.osv):
|
|||
return False
|
||||
|
||||
def _get_logo(self, cr, uid, ids):
|
||||
return open(os.path.join(
|
||||
tools.config['root_path'], '..', 'pixmaps', 'your_logo.png'),
|
||||
'rb') .read().encode('base64')
|
||||
return open(os.path.join( tools.config['root_path'], 'addons', 'base', 'res', 'res_company_logo.png'), 'rb') .read().encode('base64')
|
||||
|
||||
_header = """
|
||||
<header>
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 139 KiB |
27
setup.README
|
@ -1,27 +0,0 @@
|
|||
Some instructions to use setup.py for a user-install.
|
||||
This file should/will be moved on a proper documentation place later.
|
||||
|
||||
- Possibly clean any left-over of the previous build.
|
||||
> rm -rf dist openerp_server.egg-info
|
||||
|
||||
- Possibly copy the addons in the server if we want them to be packaged
|
||||
together:
|
||||
> rsync -av --delete \
|
||||
--exclude .bzr/ \
|
||||
--exclude .bzrignore \
|
||||
--exclude /__init__.py \
|
||||
--exclude /base \
|
||||
--exclude /base_quality_interrogation.py \
|
||||
<path-to-addons> openerp/addons
|
||||
|
||||
- Create the user-local directory where we want the package to be installed:
|
||||
> mkdir -p /home/openerp/openerp-tmp/lib/python2.6/site-packages/
|
||||
|
||||
- Use --prefix to specify where the package is installed and include that
|
||||
place in PYTHONPATH:
|
||||
> PYTHONPATH=/home/openerp/openerp-tmp/lib/python2.6/site-packages/ \
|
||||
python setup.py install --prefix=/home/openerp/openerp-tmp
|
||||
|
||||
- Run the main script, again specifying the PYTHONPATH:
|
||||
> PYTHONPATH=/home/openerp/openerp-tmp/lib/python2.6/site-packages/ \
|
||||
/home/openerp/openerp-tmp/bin/openerp-server
|
|
@ -17,4 +17,4 @@ requires=python >= 2.5
|
|||
|
||||
# Need to overwrite the install-part of the RPM to patch
|
||||
# the filenames of the man pages.
|
||||
install_script=rpminstall_sh.txt
|
||||
install_script=setup_rpm.sh
|
||||
|
|
71
setup.py
|
@ -20,15 +20,12 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import os, sys
|
||||
import os
|
||||
import glob, os, re, setuptools, sys
|
||||
from os.path import join, isfile
|
||||
import glob
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
execfile(join('openerp', 'release.py'))
|
||||
|
||||
py2exe_keywords = {}
|
||||
py2exe_data_files = []
|
||||
if os.name == 'nt':
|
||||
import py2exe
|
||||
py2exe_keywords['console'] = [
|
||||
|
@ -52,37 +49,30 @@ if os.name == 'nt':
|
|||
"excludes" : ["Tkconstants","Tkinter","tcl"],
|
||||
}
|
||||
}
|
||||
# TODO is it still necessary now that we don't use the library.zip file?
|
||||
def data_files():
|
||||
'''For Windows, we consider all the addons as data files.
|
||||
It seems also that package_data below isn't honored by py2exe.'''
|
||||
files = []
|
||||
os.chdir('openerp')
|
||||
for (dp, dn, names) in os.walk('addons'):
|
||||
files.append((join('openerp',dp), map(lambda x: join('openerp', dp, x), names)))
|
||||
os.chdir('..')
|
||||
files.append(('openerp', [join('openerp', 'import_xml.rng'),]))
|
||||
|
||||
# copy pytz/timzeone
|
||||
# TODO check if we have to also copy dateutil's timezone data.
|
||||
import pytz
|
||||
# Make sure the layout of pytz hasn't changed
|
||||
assert (pytz.__file__.endswith('__init__.pyc') or
|
||||
pytz.__file__.endswith('__init__.py')), pytz.__file__
|
||||
pytz_dir = os.path.dirname(pytz.__file__)
|
||||
# List all data files
|
||||
def data():
|
||||
files = []
|
||||
for root, dirnames, filenames in os.walk('openerp'):
|
||||
for filename in filenames:
|
||||
if not re.match(r'.*(\.pyc|\.pyo|\~)$',filename):
|
||||
files.append(os.path.join(root, filename))
|
||||
d = {}
|
||||
for v in files:
|
||||
k=os.path.dirname(v)
|
||||
if k in d:
|
||||
d[k].append(v)
|
||||
else:
|
||||
d[k]=[v]
|
||||
r = d.items()
|
||||
return r
|
||||
|
||||
saved_dir = os.getcwd()
|
||||
os.chdir(pytz_dir)
|
||||
for dp, dn, names in os.walk('zoneinfo'):
|
||||
files.append((join('pytz',dp), map(lambda x: join(pytz_dir, dp, x), names)))
|
||||
os.chdir(saved_dir)
|
||||
def gen_manifest():
|
||||
file_list="\n".join(data())
|
||||
open('MANIFEST','w').write(file_list)
|
||||
|
||||
return files
|
||||
py2exe_data_files = data_files()
|
||||
|
||||
execfile(join('openerp', 'release.py'))
|
||||
|
||||
setup(name = name,
|
||||
setuptools.setup(
|
||||
name = name,
|
||||
version = version,
|
||||
description = description,
|
||||
long_description = long_desc,
|
||||
|
@ -91,18 +81,10 @@ setup(name = name,
|
|||
author_email = author_email,
|
||||
classifiers = filter(None, classifiers.split("\n")),
|
||||
license = license,
|
||||
data_files = [
|
||||
(join('man', 'man1'), ['man/openerp-server.1']),
|
||||
(join('man', 'man5'), ['man/openerp_serverrc.5']),
|
||||
('doc', filter(isfile, glob.glob('doc/*'))),
|
||||
] + py2exe_data_files,
|
||||
scripts = ['openerp-server'],
|
||||
packages = find_packages(),
|
||||
include_package_data = True,
|
||||
package_data = {
|
||||
'': ['*.yml', '*.xml', '*.po', '*.pot', '*.csv'],
|
||||
},
|
||||
dependency_links = ['http://download.gna.org/pychart/'],
|
||||
data_files = data(),
|
||||
packages = setuptools.find_packages(),
|
||||
#include_package_data = True,
|
||||
install_requires = [
|
||||
# We require the same version as caldav for lxml.
|
||||
'lxml==2.1.5',
|
||||
|
@ -114,6 +96,7 @@ setup(name = name,
|
|||
# It is probably safe to move to PyChart 1.39 (the latest one).
|
||||
# (Let setup.py choose the latest one, and we should check we can remove pychart from
|
||||
# our tree.)
|
||||
# http://download.gna.org/pychart/
|
||||
'pychart',
|
||||
'pydot',
|
||||
'pytz',
|
||||
|
|