summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorStephane Wirtel <stephane@openerp.com>2010-05-27 15:42:32 +0200
committerStephane Wirtel <stephane@openerp.com>2010-05-27 15:42:32 +0200
commit62c4eb806f9ddfd9e9bcb47c435213023d62f01a (patch)
tree3d4c1b0955ec6871da9503940c1f2750f2fa8fba /setup.py
parentc52e9bd9cb5648c9a0214d7cb10c980c41fd2172 (diff)
[FIX] Use the get_python_lib of distutils. This function is very
useful because it returns the right directory to store the data files for OpenERP. This patch fix a bug with the dist-packages directory and python 2.6 on Ubuntu >= 9.04 bzr revid: stephane@openerp.com-20100527134232-ah3wotkz5dea7045
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index cb51961ed3c..39fda7703e8 100755
--- a/setup.py
+++ b/setup.py
@@ -34,6 +34,7 @@ import glob
from distutils.core import setup, Command
from distutils.command.install import install
+from distutils.sysconfig import get_python_lib
has_py2exe = False
if os.name == 'nt':
@@ -122,7 +123,7 @@ def data_files():
files.append((join(doc_directory, 'migrate', '3.4.0-4.0.0'),
filter(isfile, glob.glob('doc/migrate/3.4.0-4.0.0/*'))))
- openerp_site_packages = join('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server')
+ openerp_site_packages = join(get_python_lib(prefix=''), 'openerp-server')
files.append((openerp_site_packages, [join('bin', 'import_xml.rng'),
join('bin', 'server.pkey'),
@@ -134,7 +135,7 @@ def data_files():
join('python25-compat','SocketServer.py')]))
for addonname, add_path in find_addons():
- addon_path = join('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server','addons', addonname)
+ addon_path = join(get_python_lib(prefix=''), 'openerp-server','addons', addonname)
for root, dirs, innerfiles in os.walk(add_path):
innerfiles = filter(lambda fil: os.path.splitext(fil)[1] not in ('.pyc', '.pyd', '.pyo'), innerfiles)
if innerfiles: