[60888] trunk/dports/python

stromnov at macports.org stromnov at macports.org
Fri Nov 27 05:40:13 PST 2009


Revision: 60888
          http://trac.macports.org/changeset/60888
Author:   stromnov at macports.org
Date:     2009-11-27 05:40:10 -0800 (Fri, 27 Nov 2009)
Log Message:
-----------
py26-polygon: New port.

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

Added: trunk/dports/python/py26-polygon/Portfile
===================================================================
--- trunk/dports/python/py26-polygon/Portfile	                        (rev 0)
+++ trunk/dports/python/py26-polygon/Portfile	2009-11-27 13:40:10 UTC (rev 60888)
@@ -0,0 +1,43 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           python26 1.0
+
+name                py26-polygon
+version             2.0.1
+maintainers         stromnov openmaintainer
+
+description         Python bindings for General Polygon Clipping Library
+
+long_description    \
+    Polygon is a python package that simplifies the handling of polygons \
+    in 2D. It contains Python bindings for gpc, the excellent General \
+    Polygon Clipping Library by Alan Murta and some extensions written \
+    in C and pure Python.
+
+platforms           darwin
+
+homepage            http://polygon.origo.ethz.ch/
+master_sites        http://download.origo.ethz.ch/polygon/1413/
+distname            Polygon-${version}
+use_zip             yes
+
+checksums           md5     83215d6ce8130ff82dc4630164379ee2 \
+                    sha1    6839bf0cff899df12eb3674dc5b1cca582d250d4 \
+                    rmd160  6a9d6c3fe61629a79c5d1dcbc6d8c5354894c3bc
+
+variant numpy description {Build with NumPy support} {
+    depends_lib-append  port:py26-numpy
+    patchfiles-append   patch-setup.py.diff
+}
+
+post-destroot {
+    xinstall -m 644 -W ${worksrcpath}/doc \
+        Examples.py Polygon.txt testpoly.gpf \
+        ${destroot}${prefix}/share/doc/${name}
+}
+
+livecheck.type      regex
+livecheck.url       ${homepage}/download
+livecheck.regex     "Polygon-(2+(?:\\.\\d+)*)${extract.suffix}"


Property changes on: trunk/dports/python/py26-polygon/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/python/py26-polygon/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py26-polygon/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py26-polygon/files/patch-setup.py.diff	2009-11-27 13:40:10 UTC (rev 60888)
@@ -0,0 +1,22 @@
+--- setup.py.orig	2009-11-27 16:23:08.000000000 +0300
++++ setup.py	2009-11-27 16:24:01.000000000 +0300
+@@ -6,12 +6,17 @@
+ #  * faster adding of contours from NumPy arrays
+ #  * data style STYLE_NUMPY to get contours and TriStrips
+ #    as NumPy arrays
+-withNumPy=False
++withNumPy=True
+ 
+ # if withNumPy is True, set the include path for numpy/arrayobject.h
+ # the example is for python-x,y on Windows:
+ # numPyIncludePath='C:\\Programme\\pythonxy\\python\\Lib\\site-packages\\numpy\\core\\include'
+-numPyIncludePath=''
++try:
++    import numpy
++except ImportError:
++    raise Exception("PYTHON interface requires numpy")
++numPyIncludePath = numpy.get_include()
++
+ 
+ # 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/20091127/71e641fa/attachment.html>


More information about the macports-changes mailing list