[104039] trunk/dports/python/py-scikit-image

stromnov at macports.org stromnov at macports.org
Wed Mar 13 10:35:41 PDT 2013


Revision: 104039
          https://trac.macports.org/changeset/104039
Author:   stromnov at macports.org
Date:     2013-03-13 10:35:41 -0700 (Wed, 13 Mar 2013)
Log Message:
-----------
py-scikit-image: add cython support, drop py33 variant (py33-scipy not available for now), bump revision

Modified Paths:
--------------
    trunk/dports/python/py-scikit-image/Portfile

Added Paths:
-----------
    trunk/dports/python/py-scikit-image/files/
    trunk/dports/python/py-scikit-image/files/patch-skimage__build.py.diff

Modified: trunk/dports/python/py-scikit-image/Portfile
===================================================================
--- trunk/dports/python/py-scikit-image/Portfile	2013-03-13 16:22:16 UTC (rev 104038)
+++ trunk/dports/python/py-scikit-image/Portfile	2013-03-13 17:35:41 UTC (rev 104039)
@@ -1,4 +1,4 @@
-# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# -*- 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
@@ -7,10 +7,13 @@
 
 github.setup        scikit-image scikit-image 0.8.2 v
 name                py-${name}
+revision            1
 categories-append   science
+platforms           darwin
 license             BSD
-platforms           darwin
 
+python.versions     26 27 32
+
 maintainers         stromnov openmaintainer
 
 description         Image processing algorithms for SciPy.
@@ -24,15 +27,21 @@
 checksums           rmd160  a759f6a55c8556f9677b7d67d0bad3c69a385c4e \
                     sha256  158e77a2f1169caf8ee48c0b8f0e0263a3a3e93636a7805dda5457e6006ea42d
 
-python.default_version  27
-python.versions     26 27 32 33
+if {$subport != $name} {
+    patchfiles          patch-skimage__build.py.diff
 
-if {$subport != $name} {
+    depends_build-append \
+                        port:py${python.version}-cython
+
     depends_lib-append  port:py${python.version}-distribute \
-                        port:py${python.version}-cython \
                         port:py${python.version}-numpy
 
-    depends_run         port:py${python.version}-scipy
+    depends_run-append  port:py${python.version}-scipy
 
+    post-patch {
+        reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/skimage/_build.py
+        reinplace "s|@python.branch@|${python.branch}|g" ${worksrcpath}/skimage/_build.py
+    }
+
     livecheck.type      none
 }

Added: trunk/dports/python/py-scikit-image/files/patch-skimage__build.py.diff
===================================================================
--- trunk/dports/python/py-scikit-image/files/patch-skimage__build.py.diff	                        (rev 0)
+++ trunk/dports/python/py-scikit-image/files/patch-skimage__build.py.diff	2013-03-13 17:35:41 UTC (rev 104039)
@@ -0,0 +1,16 @@
+--- skimage/_build.py.orig	2013-03-07 02:12:35.000000000 +0400
++++ skimage/_build.py	2013-03-13 21:18:21.000000000 +0400
+@@ -41,11 +41,11 @@
+             c_file = pyxfile[:-4] + '.c'
+ 
+             # run cython compiler
+-            cmd = 'cython -o %s %s' % (c_file, pyxfile)
++            cmd = '@prefix@/bin/cython- at python.branch@ -o %s %s' % (c_file, pyxfile)
+             print(cmd)
+ 
+             try:
+-                subprocess.call(['cython', '-o', c_file, pyxfile])
++                subprocess.call(['@prefix@/bin/cython- at python.branch@', '-o', c_file, pyxfile])
+             except WindowsError:
+                 # On Windows cython.exe may be missing if Cython was installed
+                 # via distutils. Run the cython.py script instead.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130313/faa29d1b/attachment.html>


More information about the macports-changes mailing list