Merge lp:~camptocamp/anybox.recipe.openerp/1.8-fix_github-nbi into lp:anybox.recipe.openerp/1.8

Proposed by Nicolas Bessi - Camptocamp on 2014-05-30
Status: Work in progress
Proposed branch: lp:~camptocamp/anybox.recipe.openerp/1.8-fix_github-nbi
Merge into: lp:anybox.recipe.openerp/1.8
Diff against target: 30 lines (+7/-2)
2 files modified
anybox/recipe/openerp/base.py (+4/-1)
anybox/recipe/openerp/server.py (+3/-1)
To merge this branch: bzr merge lp:~camptocamp/anybox.recipe.openerp/1.8-fix_github-nbi
Reviewer Review Type Date Requested Status
Georges Racinet 2014-05-30 Pending
Review via email: mp+221550@code.launchpad.net

Description of the change

Fix setup.py modification in master of Odoo

This fix depends on https://github.com/odoo/odoo/pull/276

To post a comment you must log in.

I need some help to finalize this MP.
I'm not sure of all the places this modification must be done.
There is also a more deep modification to do in order to initialize sooner major_version

536. By Nicolas Bessi - Camptocamp on 2014-05-30

[FIX] forgotten pdb

Georges Racinet (gracinet) wrote :

Another path to solution would be to read the simpler release.py if available and avoid that setup patching that dates back to the days of OpenERP 6.0.

Unmerged revisions

536. By Nicolas Bessi - Camptocamp on 2014-05-30

[FIX] forgotten pdb

535. By Nicolas Bessi - Camptocamp on 2014-05-30

[ADD] poc to fix github compatibility some hook must be completed and major_version trouble not fixed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'anybox/recipe/openerp/base.py'
2--- anybox/recipe/openerp/base.py 2014-05-27 12:29:32 +0000
3+++ anybox/recipe/openerp/base.py 2014-05-30 14:21:19 +0000
4@@ -333,7 +333,10 @@
5 setuptools.setup = new_setup
6 distutils.core.setup = new_setup
7 sys.path.insert(0, '.')
8- with open(join(self.openerp_dir, 'setup.py'), 'rb') as f:
9+ setup_dir = 'setup' # how to get major version here ?
10+ if self.major_version >= (8, 0):
11+ setup_dir = 'setup'
12+ with open(join(self.openerp_dir, setup_dir, 'setup.py'), 'rb') as f:
13 saved_argv = sys.argv
14 sys.argv = ['setup.py', 'develop']
15 try:
16
17=== modified file 'anybox/recipe/openerp/server.py'
18--- anybox/recipe/openerp/server.py 2014-05-29 16:13:23 +0000
19+++ anybox/recipe/openerp/server.py 2014-05-30 14:21:19 +0000
20@@ -108,7 +108,9 @@
21 if self.major_version >= (6, 1):
22 openerp_dir = getattr(self, 'openerp_dir', None)
23 if openerp_dir is not None: # happens in unit tests
24- self.develop(openerp_dir, setup_has_pil=setup_has_pil)
25+ if self.major_version >= (8, 0):
26+ setup_dir = 'setup'
27+ self.develop(join(openerp_dir, setup_dir), setup_has_pil=setup_has_pil)
28 self.requirements.append('openerp')
29
30 if self.with_gunicorn:

Subscribers

People subscribed via source and target branches

to all changes: