Florent has proposed merging 
lp:~florent.x/openobject-server/trunk-pychart-remove into lp:openobject-server.

Requested reviews:
  Vo Minh Thu (OpenERP) (vmt-openerp)
  OpenERP R&D Team (openerp-dev)
  Florent (florent.x)

For more details, see:
https://code.launchpad.net/~florent.x/openobject-server/trunk-pychart-remove/+merge/92046

The PyChart library is already an install requirement because the embedded 
/openerp/pychart/ library is not used.

See the explanation below.

Note: I have reposted this mp with a lighter patch. It should be easier to 
review through Launchpad.
Once this patch is merged, you can remove the /openerp/pychart/ folder from the 
source tree.


----
== Detailed analysis ==

These are the only places where pychart is imported:

(1) openerp/__init__.py:         import pychart
(2) openerp/report/__init__.py:  import openerp.pychart
(3) openerp/report/custom.py:    from pychart import *
(4) openerp/report/misc.py:      from pychart import *


The line (1) imports embedded pychart as 'openerp.pychart' (in sys.modules) , 
but don't use it
The line (2) imports the same 'openerp.pychart', but don't use it.

The lines (3) and (4) are looking for external 'pychart' (or non-existent  
'openerp.report.pychart').
These lines fail with ImportError unless you install PyChart as a dependency.



This is the same for openobject-addons, where the import directives are looking 
for external 'pychart' (not the embedded 'openerp.pychart'):

crm/report/report_businessopp.py:           from pychart import *
mrp/report/workcenter_load.py:              from pychart import *
project_scrum/report/sprint_burndown.py:    from pychart import *
project_scrum/report/sprint_burndown.py:    import pychart.legend
project_scrum/report/task_burndown.py:      from pychart import *
project_scrum/report/task_burndown.py:      import pychart.legend
stock/report/stock_graph.py:                from pychart import *
stock/report/stock_graph.py:                import pychart.legend

-- 
https://code.launchpad.net/~florent.x/openobject-server/trunk-pychart-remove/+merge/92046
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~florent.x/openobject-server/trunk-pychart-remove into lp:openobject-server.
=== modified file 'openerp/__init__.py'
--- openerp/__init__.py	2011-09-27 16:51:33 +0000
+++ openerp/__init__.py	2012-02-08 15:17:25 +0000
@@ -32,7 +32,6 @@
 import netsvc
 import osv
 import pooler
-import pychart
 import release
 import report
 import run_tests

=== modified file 'openerp/report/__init__.py'
--- openerp/report/__init__.py	2011-06-23 09:03:57 +0000
+++ openerp/report/__init__.py	2012-02-08 15:17:25 +0000
@@ -24,7 +24,6 @@
 import print_fnc
 import custom
 import render
-import openerp.pychart
 import int_to_text
 
 import report_sxw

=== modified file 'setup.py'
--- setup.py	2012-02-07 12:14:11 +0000
+++ setup.py	2012-02-08 15:17:25 +0000
@@ -87,14 +87,10 @@
       scripts          = ['openerp-server'],
       data_files       = data(),
       packages         = setuptools.find_packages(),
+      dependency_links = ['http://download.gna.org/pychart/'],
       #include_package_data = True,
       install_requires = [
-        # TODO the pychart package we include in openerp corresponds to PyChart 1.37.
-        # It seems there is a single difference, which is a spurious print in generate_docs.py.
-        # 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/
-        # TODO  'pychart',
+          'pychart',
           'babel',
           'feedparser',
           'gdata',

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to