[101459] trunk/dports/python/py-polygon

stromnov at macports.org stromnov at macports.org
Fri Jan 11 01:59:36 PST 2013


Revision: 101459
          https://trac.macports.org/changeset/101459
Author:   stromnov at macports.org
Date:     2013-01-11 01:59:36 -0800 (Fri, 11 Jan 2013)
Log Message:
-----------
py-polygon: update to version 2.0.5

Modified Paths:
--------------
    trunk/dports/python/py-polygon/Portfile
    trunk/dports/python/py-polygon/files/patch-setup.py.diff

Modified: trunk/dports/python/py-polygon/Portfile
===================================================================
--- trunk/dports/python/py-polygon/Portfile	2013-01-11 09:44:57 UTC (rev 101458)
+++ trunk/dports/python/py-polygon/Portfile	2013-01-11 09:59:36 UTC (rev 101459)
@@ -5,8 +5,8 @@
 PortGroup           python 1.0
 
 name                py-polygon
-version             2.0.4
-revision            1
+version             2.0.5
+revision            0
 categories-append   devel math
 license             LGPL
 platforms           darwin
@@ -26,17 +26,21 @@
 distname            Polygon-${version}
 use_zip             yes
 
-checksums           md5     9a036b22d1ee9568b8cbfa40b0bfa721 \
-                    sha1    aa734572c911c0ddb4b39d1bf21f8ecbfa3685c8 \
-                    rmd160  dfb26325998f3e8b44ac36f6ef2c0be30b8d9fd9
+checksums           rmd160  6593a9ea0c8b25cab29c9cbaaf5d37230364b32d \
+                    sha256  e0a111559eee27c8aee455cca6a1c5480a593ad5b0c11719a5cf066867d7a465
 
 python.versions     25 26 27
 python.default_version 27
 
+patchfiles-append   patch-setup.py.diff
+
 variant numpy description {Build with NumPy support} {
     if {$subport != $name} {
         depends_lib-append  port:py${python.version}-numpy
-        patchfiles-append   patch-setup.py.diff
+
+        post-patch {
+            reinplace "s|withNumPy=False|withNumPy=True|g" ${worksrcpath}/setup.py
+        }
     }
 }
 

Modified: trunk/dports/python/py-polygon/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py-polygon/files/patch-setup.py.diff	2013-01-11 09:44:57 UTC (rev 101458)
+++ trunk/dports/python/py-polygon/files/patch-setup.py.diff	2013-01-11 09:59:36 UTC (rev 101459)
@@ -1,21 +1,24 @@
---- setup.py.orig	2011-04-07 15:26:45.000000000 +0400
-+++ setup.py	2011-04-07 15:27:57.000000000 +0400
-@@ -6,12 +6,16 @@
+--- setup.py.orig	2012-07-03 13:55:50.000000000 +0400
++++ setup.py	2013-01-11 13:54:00.000000000 +0400
+@@ -5,12 +5,19 @@
  #  * faster adding of contours from NumPy arrays
  #  * data style STYLE_NUMPY to get contours and TriStrips
  #    as NumPy arrays
--withNumPy=False
-+withNumPy=True
+-withNumPy=True
++withNumPy=False
  
  # if withNumPy is True, set the include path for numpy/arrayobject.h
  # the example is for python on Windows:
  # numPyIncludePath='C:\\Python26\\Lib\\site-packages\\numpy\\core\\include'
 -numPyIncludePath=''
-+try:
-+    import numpy
-+except ImportError:
-+    raise Exception("PYTHON interface requires numpy")
-+numPyIncludePath = numpy.get_include()
++if withNumPy:
++    try:
++        import numpy
++    except ImportError:
++        raise Exception("PYTHON interface requires numpy")
++    numPyIncludePath = numpy.get_include()
++else:
++    numPyIncludePath = ''
  
  # defaultStyle may be used to set the default style to one of:
  #  * STYLE_TUPLE to get tuples of points
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130111/333e87fb/attachment.html>


More information about the macports-changes mailing list