[43102] trunk/dports/python

mcalhoun at macports.org mcalhoun at macports.org
Fri Dec 5 00:05:15 PST 2008


Revision: 43102
          http://trac.macports.org/changeset/43102
Author:   mcalhoun at macports.org
Date:     2008-12-05 00:05:10 -0800 (Fri, 05 Dec 2008)
Log Message:
-----------
py26-numpy: New Port

Added Paths:
-----------
    trunk/dports/python/py26-numpy/
    trunk/dports/python/py26-numpy/Portfile
    trunk/dports/python/py26-numpy/files/
    trunk/dports/python/py26-numpy/files/patch-f2py_setup.py.diff
    trunk/dports/python/py26-numpy/files/patch-g95_link.diff

Added: trunk/dports/python/py26-numpy/Portfile
===================================================================
--- trunk/dports/python/py26-numpy/Portfile	                        (rev 0)
+++ trunk/dports/python/py26-numpy/Portfile	2008-12-05 08:05:10 UTC (rev 43102)
@@ -0,0 +1,74 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem              1.0
+
+#######################################################################################################
+# PortGroup python26 1.0
+#######################################################################################################
+# Can be removed once MacPorts 1.7.0 is released
+if {![info exists frameworks_dir]} {
+    set frameworks_dir ${prefix}/Library/Frameworks
+}
+
+set python.bin	    ${prefix}/bin/python2.6
+set python.lib	    ${frameworks_dir}/Python.framework/Versions/2.6/Python
+set python.pkgd	    ${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages
+set python.bindir	${frameworks_dir}/Python.framework/Versions/2.6/bin
+set python.include	${frameworks_dir}/Python.framework/Versions/2.6/include/python2.6
+
+categories		python
+
+dist_subdir		python
+
+depends_lib		port:python26
+
+use_configure	no
+
+build.cmd		${python.bin} setup.py --no-user-cfg
+build.target	build
+
+destroot.cmd	           ${python.bin} setup.py --no-user-cfg
+destroot.destdir	       --prefix=${frameworks_dir}/Python.framework/Versions/2.6 --root=${destroot}
+configure.pkg_config_path  ${frameworks_dir}/Python.framework/Versions/2.6/lib/pkgconfig
+
+set env(PATH) "${python.bindir}:$env(PATH)"
+
+pre-destroot	{
+	xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/examples
+}
+#######################################################################################################
+
+name                    py26-numpy
+version                 1.2.1
+categories              python
+platforms               darwin
+maintainers             mcalhoun openmaintainer
+description             The core utilities for the scientific library scipy for Python
+long_description        ${description}
+
+homepage                http://numpy.scipy.org/
+master_sites            sourceforge:numpy
+distname                numpy-${version}
+
+checksums           md5 1bc6dbddaf4b48ded8a619c6438fff37 \
+                    sha1 1aa706e733aea18eaffa70d93c0105718acb66c5 \
+                    rmd160 7eb721d0d853f3b0b9b04a4f447353873d6c0997
+
+patchfiles              patch-g95_link.diff \
+                        patch-f2py_setup.py.diff
+
+depends_lib-append      port:fftw-3 \
+                        port:py26-nose
+
+post-patch {
+    reinplace "s|@@MPORTS_PYTHON_LIBRARY@@|${python.lib}|" ${worksrcpath}/numpy/distutils/fcompiler/g95.py
+    reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" ${worksrcpath}/numpy/f2py/setup.py
+}
+
+post-destroot {
+    set branch 2.6
+    ln -s ${python.bindir}/f2py ${destroot}${prefix}/bin/f2py-${branch}
+}
+
+livecheck.distname      NumPy

Added: trunk/dports/python/py26-numpy/files/patch-f2py_setup.py.diff
===================================================================
--- trunk/dports/python/py26-numpy/files/patch-f2py_setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py26-numpy/files/patch-f2py_setup.py.diff	2008-12-05 08:05:10 UTC (rev 43102)
@@ -0,0 +1,20 @@
+--- numpy/f2py/setup.py	2008-07-27 20:43:18.000000000 -0500
++++ numpy/f2py/setup.py	2008-07-27 20:44:46.000000000 -0500
+@@ -52,7 +52,7 @@
+             log.info('Creating %s', target)
+             f = open(target,'w')
+             f.write('''\
+-#!/usr/bin/env %s
++#!@@MPORTS_PYTHON@@
+ # See http://cens.ioc.ee/projects/f2py2e/
+ import os, sys
+ for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
+@@ -78,7 +78,7 @@
+     print >> sys.stderr, "Unknown mode:",`mode`
+     sys.exit(1)
+ main()
+-'''%(os.path.basename(sys.executable)))
++''')
+             f.close()
+         return target
+ 

Added: trunk/dports/python/py26-numpy/files/patch-g95_link.diff
===================================================================
--- trunk/dports/python/py26-numpy/files/patch-g95_link.diff	                        (rev 0)
+++ trunk/dports/python/py26-numpy/files/patch-g95_link.diff	2008-12-05 08:05:10 UTC (rev 43102)
@@ -0,0 +1,11 @@
+--- numpy/distutils/fcompiler/g95.py	2007-11-07 17:05:14.000000000 -0500
++++ numpy/distutils/fcompiler/g95.py	2008-01-30 21:26:47.000000000 -0500
+@@ -21,7 +21,7 @@
+         'compiler_f77' : ["g95", "-ffixed-form"],
+         'compiler_fix' : ["g95", "-ffixed-form"],
+         'compiler_f90' : ["g95"],
+-        'linker_so'    : ["<F90>","-shared"],
++        'linker_so'    : ["<F90>","-dynamiclib @@MPORTS_PYTHON_LIBRARY@@"],
+         'archiver'     : ["ar", "-cr"],
+         'ranlib'       : ["ranlib"]
+         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081205/0656e317/attachment.html>


More information about the macports-changes mailing list