[56252] trunk/dports/python

jameskyle at macports.org jameskyle at macports.org
Tue Aug 25 12:51:47 PDT 2009


Revision: 56252
          http://trac.macports.org/changeset/56252
Author:   jameskyle at macports.org
Date:     2009-08-25 12:51:47 -0700 (Tue, 25 Aug 2009)
Log Message:
-----------
Nifti python interface for python 2.6

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

Added: trunk/dports/python/py26-pynifti/Portfile
===================================================================
--- trunk/dports/python/py26-pynifti/Portfile	                        (rev 0)
+++ trunk/dports/python/py26-pynifti/Portfile	2009-08-25 19:51:47 UTC (rev 56252)
@@ -0,0 +1,48 @@
+# -*- 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-pynifti
+version                 0.20090303.1
+categories              python
+platforms               darwin
+maintainers             jameskyle
+description             PyNIfTI aims to provide easy access to NIfTI images from within Python.
+long_description        ${description}. It uses SWIG-generated wrappers for the NIfTI reference library and provides the NiftiImage class for Python-style access to the image data.
+
+homepage                http://sourceforge.net/projects/niftilib
+master_sites            sourceforge:niftilib
+
+checksums           md5     6625c0db0ba4776c14327affa5c0098a \
+                    sha1    96072c1b79c882a7a14461c9b48366a34f211e05 \
+                    rmd160  b6e10b401f8e6585126426d207c9d6e9e393f382
+
+depends_lib             port:py26-numpy \
+                        port:nifticlib \
+                        port:swig
+
+depends_build           port:gcc43
+
+build.env               CCFLAGS="-I${prefix}/include -L${prefix}/lib -I${prefix}/include/nifti"
+configure.compiler      macports-gcc-4.3
+
+distfiles               pynifti_${version}${extract.suffix}
+worksrcdir              pynifti-${version}
+patchfiles              patch-setup-py.diff
+post-patch {
+  reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py
+}
+
+pre-fetch {
+  if {![llength [glob -nocomplain ${prefix}/share/swig/*/python/python.swg]]} {
+    ui_error "The python variant of swig is not installed. Please run"
+    ui_error "the following commands:"
+    ui_error "$ sudo port uninstall swig"
+    ui_error "$ sudo port install swig +python"
+    error "python variant of swig required"
+  }
+}
+livecheck.url http://sourceforge.net/export/rss2_projfiles.php?project=niftilib
+livecheck.regex {pynifti_([0-9.]+).tar.gz}


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

Added: trunk/dports/python/py26-pynifti/files/patch-setup-py.diff
===================================================================
--- trunk/dports/python/py26-pynifti/files/patch-setup-py.diff	                        (rev 0)
+++ trunk/dports/python/py26-pynifti/files/patch-setup-py.diff	2009-08-25 19:51:47 UTC (rev 56252)
@@ -0,0 +1,16 @@
+--- setup.py.orig	2009-06-20 11:37:59.000000000 -0700
++++ setup.py	2009-06-20 11:38:38.000000000 -0700
+@@ -45,11 +45,8 @@
+ else:
+     # try to look for nifticlibs in some place
+     if not sys.platform.startswith('win'):
+-        include_dirs += ['/usr/include/nifti',
+-                         '/usr/include/nifticlibs',
+-                         '/usr/local/include/nifti',
+-                         '/usr/local/include/nifticlibs',
+-                         '/usr/local/include']
++        include_dirs += ['@@PREFIX@@/include/nifti']
++        library_dirs.append('@@PREFIX@@/lib')
+     else:
+         # no clue on windows
+         pass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090825/4afb0f20/attachment.html>


More information about the macports-changes mailing list