diff --git a/MANIFEST.in b/MANIFEST.in index 6cd10b511cf..70715f18bc2 100644 --- a/MANIFEST.in +++ b/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. diff --git a/README b/README index 5725ce9f866..a6fe10c8ffb 100644 --- a/README +++ b/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 \ + 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 + diff --git a/doc/Changelog b/history/Changelog similarity index 100% rename from doc/Changelog rename to history/Changelog diff --git a/doc/Changelog-4.x b/history/Changelog-4.x similarity index 100% rename from doc/Changelog-4.x rename to history/Changelog-4.x diff --git a/doc/Changelog-6.x b/history/Changelog-6.x similarity index 100% rename from doc/Changelog-6.x rename to history/Changelog-6.x diff --git a/doc/INSTALL b/history/INSTALL similarity index 100% rename from doc/INSTALL rename to history/INSTALL diff --git a/doc/README.urpmi b/history/README.urpmi similarity index 100% rename from doc/README.urpmi rename to history/README.urpmi diff --git a/doc/README.userchange b/history/README.userchange similarity index 100% rename from doc/README.userchange rename to history/README.userchange diff --git a/tools/change-loglevel.sh b/history/change-loglevel.sh similarity index 100% rename from tools/change-loglevel.sh rename to history/change-loglevel.sh diff --git a/doc/tests/check_profile_l10n_all.py b/history/check_profile_l10n_all.py similarity index 100% rename from doc/tests/check_profile_l10n_all.py rename to history/check_profile_l10n_all.py diff --git a/sql/clean-model.sql b/history/clean-model.sql similarity index 100% rename from sql/clean-model.sql rename to history/clean-model.sql diff --git a/tools/gen_graph.sh b/history/gen_graph.sh similarity index 100% rename from tools/gen_graph.sh rename to history/gen_graph.sh diff --git a/tools/get-srvstats.sh b/history/get-srvstats.sh similarity index 100% rename from tools/get-srvstats.sh rename to history/get-srvstats.sh diff --git a/tools/list-services.sh b/history/list-services.sh similarity index 100% rename from tools/list-services.sh rename to history/list-services.sh diff --git a/doc/migrate/3.3.0-3.4.0/README b/history/migrate/3.3.0-3.4.0/README similarity index 100% rename from doc/migrate/3.3.0-3.4.0/README rename to history/migrate/3.3.0-3.4.0/README diff --git a/doc/migrate/3.3.0-3.4.0/post.py b/history/migrate/3.3.0-3.4.0/post.py similarity index 100% rename from doc/migrate/3.3.0-3.4.0/post.py rename to history/migrate/3.3.0-3.4.0/post.py diff --git a/doc/migrate/3.3.0-3.4.0/pre.py b/history/migrate/3.3.0-3.4.0/pre.py similarity index 100% rename from doc/migrate/3.3.0-3.4.0/pre.py rename to history/migrate/3.3.0-3.4.0/pre.py diff --git a/doc/migrate/3.4.0-4.0.0/README b/history/migrate/3.4.0-4.0.0/README similarity index 100% rename from doc/migrate/3.4.0-4.0.0/README rename to history/migrate/3.4.0-4.0.0/README diff --git a/doc/migrate/3.4.0-4.0.0/post-tiny.py b/history/migrate/3.4.0-4.0.0/post-tiny.py similarity index 100% rename from doc/migrate/3.4.0-4.0.0/post-tiny.py rename to history/migrate/3.4.0-4.0.0/post-tiny.py diff --git a/doc/migrate/3.4.0-4.0.0/post.py b/history/migrate/3.4.0-4.0.0/post.py similarity index 100% rename from doc/migrate/3.4.0-4.0.0/post.py rename to history/migrate/3.4.0-4.0.0/post.py diff --git a/doc/migrate/3.4.0-4.0.0/pre-tiny.py b/history/migrate/3.4.0-4.0.0/pre-tiny.py similarity index 100% rename from doc/migrate/3.4.0-4.0.0/pre-tiny.py rename to history/migrate/3.4.0-4.0.0/pre-tiny.py diff --git a/doc/migrate/3.4.0-4.0.0/pre.py b/history/migrate/3.4.0-4.0.0/pre.py similarity index 100% rename from doc/migrate/3.4.0-4.0.0/pre.py rename to history/migrate/3.4.0-4.0.0/pre.py diff --git a/doc/migrate/4.0.0-4.2.0/pre.py b/history/migrate/4.0.0-4.2.0/pre.py similarity index 100% rename from doc/migrate/4.0.0-4.2.0/pre.py rename to history/migrate/4.0.0-4.2.0/pre.py diff --git a/doc/migrate/4.0.0-4.2.0/tiny/README b/history/migrate/4.0.0-4.2.0/tiny/README similarity index 100% rename from doc/migrate/4.0.0-4.2.0/tiny/README rename to history/migrate/4.0.0-4.2.0/tiny/README diff --git a/doc/migrate/4.0.0-4.2.0/tiny/pre-tiny.py b/history/migrate/4.0.0-4.2.0/tiny/pre-tiny.py similarity index 100% rename from doc/migrate/4.0.0-4.2.0/tiny/pre-tiny.py rename to history/migrate/4.0.0-4.2.0/tiny/pre-tiny.py diff --git a/doc/migrate/4.2.0-4.4.0/pre.py b/history/migrate/4.2.0-4.4.0/pre.py similarity index 100% rename from doc/migrate/4.2.0-4.4.0/pre.py rename to history/migrate/4.2.0-4.4.0/pre.py diff --git a/tools/module_graph.py b/history/module_graph.py similarity index 100% rename from tools/module_graph.py rename to history/module_graph.py diff --git a/tools/xml2yml.py b/history/xml2yml.py similarity index 100% rename from tools/xml2yml.py rename to history/xml2yml.py diff --git a/pixmaps/openerp-header.bmp b/install/openerp-header.bmp similarity index 100% rename from pixmaps/openerp-header.bmp rename to install/openerp-header.bmp diff --git a/pixmaps/openerp-header.png b/install/openerp-header.png similarity index 100% rename from pixmaps/openerp-header.png rename to install/openerp-header.png diff --git a/pixmaps/openerp-icon.ico b/install/openerp-icon.ico similarity index 100% rename from pixmaps/openerp-icon.ico rename to install/openerp-icon.ico diff --git a/pixmaps/openerp-icon.png b/install/openerp-icon.png similarity index 100% rename from pixmaps/openerp-icon.png rename to install/openerp-icon.png diff --git a/man/openerp-server.1 b/install/openerp-server.1 similarity index 100% rename from man/openerp-server.1 rename to install/openerp-server.1 diff --git a/doc/openerp-server.conf b/install/openerp-server.conf similarity index 100% rename from doc/openerp-server.conf rename to install/openerp-server.conf diff --git a/doc/openerp-server.init b/install/openerp-server.init similarity index 100% rename from doc/openerp-server.init rename to install/openerp-server.init diff --git a/doc/openerp-server.logrotate b/install/openerp-server.logrotate similarity index 100% rename from doc/openerp-server.logrotate rename to install/openerp-server.logrotate diff --git a/pixmaps/openerp.ico b/install/openerp.ico similarity index 100% rename from pixmaps/openerp.ico rename to install/openerp.ico diff --git a/pixmaps/openerp.png b/install/openerp.png similarity index 100% rename from pixmaps/openerp.png rename to install/openerp.png diff --git a/man/openerp_serverrc.5 b/install/openerp_serverrc.5 similarity index 100% rename from man/openerp_serverrc.5 rename to install/openerp_serverrc.5 diff --git a/ssl-cert.cfg b/install/ssl-cert.cfg similarity index 100% rename from ssl-cert.cfg rename to install/ssl-cert.cfg diff --git a/openerp/addons/base/res/res_company.py b/openerp/addons/base/res/res_company.py index dc07b55a78e..51d796a3a1e 100644 --- a/openerp/addons/base/res/res_company.py +++ b/openerp/addons/base/res/res_company.py @@ -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 = """
diff --git a/pixmaps/your_logo.png b/openerp/addons/base/res/res_company_logo.png similarity index 100% rename from pixmaps/your_logo.png rename to openerp/addons/base/res/res_company_logo.png diff --git a/pixmaps/openerp-intro.bmp b/pixmaps/openerp-intro.bmp deleted file mode 100644 index 8d3c9340c9b..00000000000 Binary files a/pixmaps/openerp-intro.bmp and /dev/null differ diff --git a/pixmaps/openerp-slogan.bmp b/pixmaps/openerp-slogan.bmp deleted file mode 100644 index a3cffd104f2..00000000000 Binary files a/pixmaps/openerp-slogan.bmp and /dev/null differ diff --git a/setup.README b/setup.README deleted file mode 100644 index 5ee564ecfb4..00000000000 --- a/setup.README +++ /dev/null @@ -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 \ - 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 diff --git a/setup.cfg b/setup.cfg index 483eb2f22e1..2f64223e455 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/setup.py b/setup.py index 94c3cf50a92..9595c1a9257 100755 --- a/setup.py +++ b/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', diff --git a/rpminstall_sh.txt b/setup_rpm.sh similarity index 100% rename from rpminstall_sh.txt rename to setup_rpm.sh