Revision: 8128
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8128&view=rev
Author:   astraw
Date:     2010-02-12 17:24:56 +0000 (Fri, 12 Feb 2010)

Log Message:
-----------
allow numpy 2.x to pass check for numpy >= 1.1 (reported by Nadia Dencheva)

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/__init__.py
    trunk/matplotlib/setupext.py

Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2010-02-12 02:21:05 UTC (rev 
8127)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2010-02-12 17:24:56 UTC (rev 
8128)
@@ -147,8 +147,10 @@
 import numpy
 nn = numpy.__version__.split('.')
 if not (int(nn[0]) >= 1 and int(nn[1]) >= 1):
-    raise ImportError(
-            'numpy 1.1 or later is required; you have %s' % numpy.__version__)
+    if not (int(nn[0]) >= 2):
+        raise ImportError(
+                'numpy 1.1 or later is required; you have %s' %
+                numpy.__version__)
 
 def is_string_like(obj):
     if hasattr(obj, 'shape'): return 0

Modified: trunk/matplotlib/setupext.py
===================================================================
--- trunk/matplotlib/setupext.py        2010-02-12 02:21:05 UTC (rev 8127)
+++ trunk/matplotlib/setupext.py        2010-02-12 17:24:56 UTC (rev 8128)
@@ -516,9 +516,11 @@
         return False
     nn = numpy.__version__.split('.')
     if not (int(nn[0]) >= 1 and int(nn[1]) >= 1):
-        print_message(
-           'numpy 1.1 or later is required; you have %s' % numpy.__version__)
-        return False
+        if not (int(nn[0]) >= 2):
+            print_message(
+               'numpy 1.1 or later is required; you have %s' %
+               numpy.__version__)
+            return False
     module = Extension('test', [])
     add_numpy_flags(module)
     add_base_flags(module)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to