[101594] trunk/dports/python/py-polygon
stromnov at macports.org
stromnov at macports.org
Mon Jan 14 03:59:50 PST 2013
Revision: 101594
https://trac.macports.org/changeset/101594
Author: stromnov at macports.org
Date: 2013-01-14 03:59:50 -0800 (Mon, 14 Jan 2013)
Log Message:
-----------
py-polygon: use patch instead of reinplace
Modified Paths:
--------------
trunk/dports/python/py-polygon/Portfile
trunk/dports/python/py-polygon/files/patch-setup.py.diff
Added Paths:
-----------
trunk/dports/python/py-polygon/files/patch-setup.py-numpy.diff
Modified: trunk/dports/python/py-polygon/Portfile
===================================================================
--- trunk/dports/python/py-polygon/Portfile 2013-01-14 11:48:31 UTC (rev 101593)
+++ trunk/dports/python/py-polygon/Portfile 2013-01-14 11:59:50 UTC (rev 101594)
@@ -30,23 +30,17 @@
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
-
- post-patch {
- reinplace "s|withNumPy=False|withNumPy=True|g" ${worksrcpath}/setup.py
- }
- }
-}
-
if {$subport != $name} {
depends_lib-append port:py${python.version}-distribute
+ variant numpy description {Build with NumPy support} {
+ depends_lib-append port:py${python.version}-numpy
+ patchfiles-append patch-setup.py-numpy.diff
+ }
+
post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
xinstall -m 644 -W ${worksrcpath}/doc \
Added: trunk/dports/python/py-polygon/files/patch-setup.py-numpy.diff
===================================================================
--- trunk/dports/python/py-polygon/files/patch-setup.py-numpy.diff (rev 0)
+++ trunk/dports/python/py-polygon/files/patch-setup.py-numpy.diff 2013-01-14 11:59:50 UTC (rev 101594)
@@ -0,0 +1,18 @@
+--- setup.py.orig 2013-01-14 15:52:45.000000000 +0400
++++ setup.py 2013-01-14 15:53:22.000000000 +0400
+@@ -10,7 +10,14 @@
+ # 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=''
++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
Modified: trunk/dports/python/py-polygon/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py-polygon/files/patch-setup.py.diff 2013-01-14 11:48:31 UTC (rev 101593)
+++ trunk/dports/python/py-polygon/files/patch-setup.py.diff 2013-01-14 11:59:50 UTC (rev 101594)
@@ -1,6 +1,6 @@
---- 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 @@
+--- setup.py.orig 2013-01-14 15:51:29.000000000 +0400
++++ setup.py 2013-01-14 15:51:38.000000000 +0400
+@@ -5,7 +5,7 @@
# * faster adding of contours from NumPy arrays
# * data style STYLE_NUMPY to get contours and TriStrips
# as NumPy arrays
@@ -9,16 +9,3 @@
# 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=''
-+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/20130114/874cdc5b/attachment.html>
More information about the macports-changes
mailing list