[46343] trunk/dports/python

blb at macports.org blb at macports.org
Mon Feb 2 20:59:04 PST 2009


Revision: 46343
          http://trac.macports.org/changeset/46343
Author:   blb at macports.org
Date:     2009-02-02 20:59:04 -0800 (Mon, 02 Feb 2009)
Log Message:
-----------
New port - python/py25-pynifti, PyNIfTI aims to provide easy access to NIfTI
images from within Python
Ticket #17933

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

Added: trunk/dports/python/py25-pynifti/Portfile
===================================================================
--- trunk/dports/python/py25-pynifti/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-pynifti/Portfile	2009-02-03 04:59:04 UTC (rev 46343)
@@ -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               python25 1.0
+
+name                    py25-pynifti
+version                 0.20081017.1 
+categories              python
+platforms               darwin
+maintainers             ucla.edu: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://niftilib.sourceforge.net/pynifti
+master_sites            http://superb-east.dl.sourceforge.net/sourceforge/niftilib/
+
+checksums               md5 ba16ec77ed1a11c8ca0ef77609c0050a \
+                        sha1 a03bfe228d937bbcf034d490ac9777caceae8d48 \
+                        rmd160 f63d3bde0db3ccdfa24ac172b70bb47e141c5503
+
+depends_lib-append      port:py25-numpy \
+                        port:nifticlib \
+                        port:swig
+
+build.env               CCFLAGS="-I${prefix}/include -L${prefix}/lib -I${prefix}/include/nifti"
+
+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"
+  }
+}


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

Added: trunk/dports/python/py25-pynifti/files/patch-setup-py.diff
===================================================================
--- trunk/dports/python/py25-pynifti/files/patch-setup-py.diff	                        (rev 0)
+++ trunk/dports/python/py25-pynifti/files/patch-setup-py.diff	2009-02-03 04:59:04 UTC (rev 46343)
@@ -0,0 +1,13 @@
+--- setup.py.old	2009-01-09 07:04:18.000000000 -0800
++++ setup.py	2009-01-09 09:08:43.000000000 -0800
+@@ -48,8 +48,8 @@
+     else:
+         # otherwise we'll just tried a few things
+         if not sys.platform.startswith('win'):
+-            include_dirs += [ '/usr/local/include/nifti',
+-                              '/usr/include/nifti' ]
++            include_dirs += [ '@@PREFIX@@/include/nifti',]
++            library_dirs.append('@@PREFIX@@/lib')
+         else:
+             # clueless on windows
+             pass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090202/97445965/attachment.html>


More information about the macports-changes mailing list