From 06ba6fcd52afc83cd657c6b97173c2ee2724d661 Mon Sep 17 00:00:00 2001
From: Tatuya Kamada <tatuya@nexedi.com>
Date: Fri, 21 Aug 2009 10:16:15 +0000
Subject: [PATCH] Searching both Numeric and numpy library for using buildout.
 It is planned that using numpy instead of Numeric.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28543 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Capacity/GLPK.py       | 5 ++++-
 product/ERP5/Tool/SimulationTool.py | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Capacity/GLPK.py b/product/ERP5/Capacity/GLPK.py
index 2b5bc418af..f41c2c764b 100644
--- a/product/ERP5/Capacity/GLPK.py
+++ b/product/ERP5/Capacity/GLPK.py
@@ -26,7 +26,10 @@
 #
 ##############################################################################
 
-from Numeric import *
+try:
+  from numpy import shape, array
+except ImportError:
+  from Numeric import shape, array
 
 MODEL_HEAD = """
 /* The number of samples.  */
diff --git a/product/ERP5/Tool/SimulationTool.py b/product/ERP5/Tool/SimulationTool.py
index f097dc9471..0b339d2f09 100644
--- a/product/ERP5/Tool/SimulationTool.py
+++ b/product/ERP5/Tool/SimulationTool.py
@@ -39,7 +39,10 @@ from Products.ERP5 import _dtmldir
 from zLOG import LOG
 
 from Products.ERP5.Capacity.GLPK import solve
-from Numeric import zeros, resize
+try:
+  from numpy import zeros, resize
+except ImportError:
+  from Numeric import zeros, resize
 from DateTime import DateTime
 
 from Products.ERP5 import DeliverySolver
-- 
2.30.9