[69687] trunk/dports/python

saispo at macports.org saispo at macports.org
Tue Jul 13 08:59:39 PDT 2010


Revision: 69687
          http://trac.macports.org/changeset/69687
Author:   saispo at macports.org
Date:     2010-07-13 08:59:37 -0700 (Tue, 13 Jul 2010)
Log Message:
-----------
add py27-scientific, py27-numpy, py27-ipython, py27-nose

Added Paths:
-----------
    trunk/dports/python/py27-ipython/
    trunk/dports/python/py27-ipython/Portfile
    trunk/dports/python/py27-nose/
    trunk/dports/python/py27-nose/Portfile
    trunk/dports/python/py27-numpy/
    trunk/dports/python/py27-numpy/Portfile
    trunk/dports/python/py27-numpy/files/
    trunk/dports/python/py27-numpy/files/patch-f2py_setup.py.diff
    trunk/dports/python/py27-numpy/files/patch-fcompiler_g95.diff
    trunk/dports/python/py27-numpy/files/patch-setup.py.diff
    trunk/dports/python/py27-numpy/files/patch-system_info.py.diff
    trunk/dports/python/py27-numpy/files/wrapper
    trunk/dports/python/py27-scientific/
    trunk/dports/python/py27-scientific/Portfile
    trunk/dports/python/py27-scientific/files/
    trunk/dports/python/py27-scientific/files/customize.py-macosx
    trunk/dports/python/py27-scientific/files/customize.py-puredarwin
    trunk/dports/python/py27-scientific/files/patch-Src-MPI-compile.py.diff

Added: trunk/dports/python/py27-ipython/Portfile
===================================================================
--- trunk/dports/python/py27-ipython/Portfile	                        (rev 0)
+++ trunk/dports/python/py27-ipython/Portfile	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,46 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem              1.0
+PortGroup               python27 1.0
+
+name                    py27-ipython
+set my_name             ipython
+version                 0.10
+categories              python
+platforms               darwin
+maintainers             akitada openmaintainer
+description             An enhanced Interactive Python shell
+long_description        Provide an interactive shell superior to Python's default. \
+                        Serve as an embeddable, ready to use interpreter for your own programs. \
+                        Offer a flexible framework which can be used as the base environment for \
+                        other systems with Python as the underlying language.  \
+                        Allow interactive testing of threaded graphical toolkits.
+
+homepage                http://ipython.scipy.org/
+master_sites            ${homepage}dist/
+distname                ${my_name}-${version}
+checksums               md5 dd10cd1b622c16c1afca2239fcc0dfdf \
+                        sha1 175bbacf74d94336e3fe06e390e04ad2bfff6fd4 \
+                        rmd160 819609298bb000aa01c3af6ad2717d91d46e39d8
+
+use_parallel_build      yes
+
+test.run                no
+
+post-destroot {
+    foreach f {ipython pycolor} {
+        ln -s ${python.prefix}/share/man/man1/${f}.1.gz ${destroot}${prefix}/share/man/man1/${f}${python.branch}.1.gz
+    }
+}
+
+variant scientific description "Use ScientificPython to provide physical quantities support" {
+    depends_lib-append      port:py27-scientific
+}
+
+default_variants        +scientific
+universal_variant       no
+
+livecheck.type          regex
+livecheck.url           ${homepage}/moin/Download
+livecheck.regex         ${my_name}-(\\d+(?:\\.\\d+)*)


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

Added: trunk/dports/python/py27-nose/Portfile
===================================================================
--- trunk/dports/python/py27-nose/Portfile	                        (rev 0)
+++ trunk/dports/python/py27-nose/Portfile	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,62 @@
+# -*- 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  python27 1.0
+
+set my_name         nose
+name				py27-${my_name}
+version				0.11.3
+categories-append	www
+maintainers			mcalhoun openmaintainer
+description			A Python unittest extension.
+long_description \
+    A unittest extension offering automatic test \
+    suite discovery, simplified test authoring, \
+    and output capture. Nose provides an alternate \
+    test discovery and running process for \
+    unittest, one that is intended to mimic the \
+    behavior of py.test as much as is reasonably \
+    possible without resorting to magic.
+
+platforms			darwin
+if {[info exists supported_archs]} {
+    supported_archs noarch
+}
+
+homepage			http://somethingaboutorange.com/mrl/projects/${my_name}/${version}
+master_sites		${homepage}
+distname			${my_name}-${version}
+
+depends_lib			port:py27-distribute
+
+checksums           md5     7f1dc53750811f78bedef9e14a4bc5a5 \
+                    sha1    37c03a5b9738575e25ef99a5ca3b021f66c53421 \
+                    rmd160  9f5e93d9bcfa2f294f97f6a5c31e462eb13e43e2
+
+post-patch {
+	reinplace "s|man/man|share/man/man|" ${worksrcpath}/setup.py
+
+    # One of the tests fails if this directory does not exist
+    file mkdir ${worksrcpath}/functional_tests/support/empty
+}
+
+post-destroot {
+    ln -s ${python.prefix}/share/man/man1/nosetests.1 ${destroot}${prefix}/share/man/man1/nosetests${python.branch}.1
+
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS CHANGELOG NEWS README.txt \
+		${destroot}${prefix}/share/doc/${name}
+
+    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}/html
+
+    file delete ${destroot}${prefix}/share/doc/${name}/examples
+    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
+}
+
+test.run  yes
+test.cmd  ${python.bin} setup.py test
+
+livecheck.type   regex
+livecheck.url    ${homepage}
+livecheck.regex     "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"


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

Added: trunk/dports/python/py27-numpy/Portfile
===================================================================
--- trunk/dports/python/py27-numpy/Portfile	                        (rev 0)
+++ trunk/dports/python/py27-numpy/Portfile	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,131 @@
+# -*- 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				python27 1.0
+
+name					py27-numpy
+epoch					20100319
+version					1.4.1
+revision				1
+categories				python
+platforms				darwin
+maintainers				mcalhoun openmaintainer
+description				Core utilities for the scientific library scipy
+long_description		${description}
+
+homepage				http://numpy.scipy.org/
+master_sites			sourceforge:numpy
+distname				numpy-${version}
+
+checksums				md5 5c7b5349dc3161763f7f366ceb96516b \
+						sha1 ec6078aa09acbcca3d90f9f36353fc83e7e1daa0 \
+						rmd160 a0bbebd1138ffc93517095e3c06459cd9744a9d6
+
+patchfiles				patch-f2py_setup.py.diff \
+						patch-system_info.py.diff \
+						patch-fcompiler_g95.diff
+
+depends_lib-append		port:fftw-3 \
+						port:py27-nose \
+						port:atlas
+
+build.env-append		ATLAS=${prefix}/lib \
+						LAPACK=${prefix}/lib \
+						BLAS=${prefix}/lib \
+						CC="${worksrcpath}/c-wrapper" \
+						CXX="${worksrcpath}/c++-wrapper" \
+						F77="${worksrcpath}/f-wrapper" \
+						F90="${worksrcpath}/f-wrapper"
+
+destroot.env-append		ATLAS=${prefix}/lib \
+						LAPACK=${prefix}/lib \
+						BLAS=${prefix}/lib \
+						CC="${worksrcpath}/c-wrapper" \
+						CXX="${worksrcpath}/c++-wrapper" \
+						F77="${worksrcpath}/f-wrapper" \
+						F90="${worksrcpath}/f-wrapper"
+
+# Variants
+
+variant no_gcc description {No gcc compiler (disables fortran code)} {
+
+}
+
+if {![variant_isset gcc45] && \
+	![variant_isset gcc44] && \
+	![variant_isset gcc43] &&
+	![variant_isset no_gcc]} { default_variants +gcc44 }
+
+variant gcc45 conflicts gcc43 gcc44 description {Uses gcc45} {
+	depends_lib-append	port:gcc45
+	configure.compiler	macports-gcc-4.5
+depends_skip_archcheck gcc46
+}
+variant gcc44 conflicts gcc43 gcc45 description {Uses gcc44 (default)} {
+	depends_lib-append	port:gcc44
+	configure.compiler	macports-gcc-4.4
+depends_skip_archcheck gcc44
+}
+
+variant gcc43 conflicts gcc44 gcc45 description {uses gcc43} {
+	depends_lib-append	port:gcc43
+	configure.compiler	macports-gcc-4.3
+depends_skip_archcheck gcc43
+}
+
+variant no_atlas description {Do not use the macports atlas libs} {
+	build.env-delete	ATLAS=${prefix}/lib \
+						LAPACK=${prefix}/lib \
+						BLAS=${prefix}/lib
+
+	destroot.env-delete ATLAS=${prefix}/lib \
+						LAPACK=${prefix}/lib \
+						BLAS=${prefix}/lib
+	depends_lib-delete  port:atlas
+}
+
+variant universal {
+	patchfiles-append   patch-setup.py.diff
+}
+
+pre-patch {
+	ui_debug ("Generating wrappers")
+	file copy -force ${filespath}/wrapper ${worksrcpath}/c-wrapper
+	file copy -force ${filespath}/wrapper ${worksrcpath}/c++-wrapper
+	file copy -force ${filespath}/wrapper ${worksrcpath}/f-wrapper
+
+	reinplace "s|+++|\\\\.c|" ${worksrcpath}/c-wrapper
+	reinplace "s/+++/(\\\\.cxx|\\\\.C|\\\\.cc)/" ${worksrcpath}/c++-wrapper
+	reinplace "s|+++|\\\\.f|" ${worksrcpath}/f-wrapper
+
+	reinplace "s|___|${prefix}|" ${worksrcpath}/c-wrapper
+	reinplace "s|___|${prefix}|" ${worksrcpath}/c++-wrapper
+	reinplace "s|___|${prefix}|" ${worksrcpath}/f-wrapper
+
+	if {[variant_isset gcc45]} {
+		reinplace "s|@@@|gcc-mp-4.5|" ${worksrcpath}/c-wrapper
+		reinplace "s|@@@|g++-mp-4.5|" ${worksrcpath}/c++-wrapper
+		reinplace "s|@@@|gfortran-mp-4.5|" ${worksrcpath}/f-wrapper
+	} elseif {[variant_isset gcc44]} {
+		reinplace "s|@@@|gcc-mp-4.4|" ${worksrcpath}/c-wrapper
+		reinplace "s|@@@|g++-mp-4.4|" ${worksrcpath}/c++-wrapper
+		reinplace "s|@@@|gfortran-mp-4.4|" ${worksrcpath}/f-wrapper
+	} elseif {[variant_isset gcc43]} {
+		reinplace "s|@@@|gcc-mp-4.3|" ${worksrcpath}/c-wrapper
+		reinplace "s|@@@|g++-mp-4.3|" ${worksrcpath}/c++-wrapper
+		reinplace "s|@@@|gfortran-mp-4.3|" ${worksrcpath}/f-wrapper
+	}
+	xinstall -m 755 ${worksrcpath}/c-wrapper ${worksrcpath}
+	xinstall -m 755 ${worksrcpath}/c++-wrapper ${worksrcpath}
+	xinstall -m 755 ${worksrcpath}/f-wrapper ${worksrcpath}
+}
+
+post-patch {
+	reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \
+		${worksrcpath}/numpy/f2py/setup.py
+}
+
+livecheck.type  regex
+livecheck.url   http://sourceforge.net/projects/numpy/files/
+livecheck.regex "files\/NumPy\/(\\d+(?:\\.\\d+)*)\/numpy"


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

Added: trunk/dports/python/py27-numpy/files/patch-f2py_setup.py.diff
===================================================================
--- trunk/dports/python/py27-numpy/files/patch-f2py_setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py27-numpy/files/patch-f2py_setup.py.diff	2010-07-13 15:59:37 UTC (rev 69687)
@@ -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/py27-numpy/files/patch-fcompiler_g95.diff
===================================================================
--- trunk/dports/python/py27-numpy/files/patch-fcompiler_g95.diff	                        (rev 0)
+++ trunk/dports/python/py27-numpy/files/patch-fcompiler_g95.diff	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,11 @@
+--- numpy/distutils/fcompiler/__init__.py	2010-04-18 05:06:17.000000000 -0500
++++ numpy/distutils/fcompiler/__init__.py	2010-04-26 19:48:16.000000000 -0500
+@@ -685,7 +685,7 @@
+     ('cygwin.*', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95')),
+     ('linux.*', ('gnu','intel','lahey','pg','absoft','nag','vast','compaq',
+                 'intele','intelem','gnu95','g95')),
+-    ('darwin.*', ('nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95', 'g95')),
++    ('darwin.*', ('nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95')),
+     ('sunos.*', ('sun','gnu','gnu95','g95')),
+     ('irix.*', ('mips','gnu','gnu95',)),
+     ('aix.*', ('ibm','gnu','gnu95',)),

Added: trunk/dports/python/py27-numpy/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py27-numpy/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py27-numpy/files/patch-setup.py.diff	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,34 @@
+--- numpy/core/setup.py.orig	2009-04-05 04:09:20.000000000 -0400
++++ numpy/core/setup.py	2009-04-08 19:53:45.000000000 -0400
+@@ -309,7 +309,14 @@
+                 if isinstance(d,str):
+                     target_f.write('#define %s\n' % (d))
+                 else:
+-                    target_f.write('#define %s %s\n' % (d[0],d[1]))
++                    if d[0]!='SIZEOF_LONG' and d[0]!='SIZEOF_PY_INTPTR_T':
++                        target_f.write('#define %s %s\n' % (d[0],d[1]))
++                    else:
++                        target_f.write('#ifdef __LP64__\n')
++                        target_f.write('#define %s %s\n' % (d[0],8))
++                        target_f.write('#else\n')
++                        target_f.write('#define %s %s\n' % (d[0],4))
++                        target_f.write('#endif\n')
+ 
+             # define inline to our keyword, or nothing
+             target_f.write('#ifndef __cplusplus\n')
+@@ -393,7 +393,14 @@
+                 if isinstance(d,str):
+                     target_f.write('#define %s\n' % (d))
+                 else:
+-                    target_f.write('#define %s %s\n' % (d[0],d[1]))
++                    if d[0]!='NPY_SIZEOF_LONG' and d[0]!='NPY_SIZEOF_PY_INTPTR_T':
++                        target_f.write('#define %s %s\n' % (d[0],d[1]))
++                    else:
++                        target_f.write('#ifdef __LP64__\n')
++                        target_f.write('#define %s %s\n' % (d[0],8))
++                        target_f.write('#else\n')
++                        target_f.write('#define %s %s\n' % (d[0],4))
++                        target_f.write('#endif\n')
+ 
+             # define NPY_INLINE to recognized keyword
+             target_f.write('#define NPY_INLINE %s\n' % inline)

Added: trunk/dports/python/py27-numpy/files/patch-system_info.py.diff
===================================================================
--- trunk/dports/python/py27-numpy/files/patch-system_info.py.diff	                        (rev 0)
+++ trunk/dports/python/py27-numpy/files/patch-system_info.py.diff	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,20 @@
+--- numpy/distutils/system_info.py.orig	2010-01-12 16:46:35.000000000 +0300
++++ numpy/distutils/system_info.py	2010-01-12 16:49:39.000000000 +0300
+@@ -1243,7 +1243,7 @@
+         if sys.platform=='darwin' and not os.environ.get('ATLAS',None):
+             args = []
+             link_args = []
+-            if get_platform()[-4:] == 'i386':
++            if get_platform().rsplit('-', 1)[1] in ('i386', 'x86_64', 'intel'):
+                 intel = 1
+             else:
+                 intel = 0
+@@ -1340,7 +1340,7 @@
+         if sys.platform=='darwin' and not os.environ.get('ATLAS',None):
+             args = []
+             link_args = []
+-            if get_platform()[-4:] == 'i386':
++            if get_platform().rsplit('-', 1)[1] in ('i386', 'x86_64', 'intel'):
+                 intel = 1
+             else:
+                 intel = 0

Added: trunk/dports/python/py27-numpy/files/wrapper
===================================================================
--- trunk/dports/python/py27-numpy/files/wrapper	                        (rev 0)
+++ trunk/dports/python/py27-numpy/files/wrapper	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,143 @@
+#!/bin/sh
+COMPILER='@@@'
+SUFFIX='+++'
+PREFIX='___'
+OUTPUT_O='NO'
+OUTPUT=''
+NAMED_OUTPUT=''
+LASTFILE=''
+INTEL='NO'
+SIZE32='NO'
+SIZE64='NO'
+NEWARGS=''
+
+SKIP='NO'
+
+for arg in $@
+do
+	if [ $SKIP = 'ARCH' ]; then
+		# intercept -arch option and set SIZEXX
+		SKIP='NO'
+		if [ $arg = 'x86_64' ] || [ $arg = 'ppc64' ]; then
+			SIZE64='YES'
+		else
+			SIZE32='YES'
+		fi
+		
+		# which architecture are we compiling for?
+		if [ $arg = 'x86_64' ] || [ $arg = 'i386' ]; then
+			INTEL='YES'
+		fi
+		
+	elif [ $arg = '-arch' ]; then
+		SKIP='ARCH'
+		
+	elif [ $arg = '--version' ]; then
+		${COMPILER} --version
+		exit 0
+		
+	else
+		NEWARGS+="$arg "
+		
+		# if the -c option is given, the output is .o
+		if [ $arg = '-c' ]; then
+			OUTPUT_O='YES'
+		fi
+
+		# if the output file is given by a -o option, record it
+		if [ $SKIP = 'O' ]; then
+			SKIP='NO'
+			NAMED_OUTPUT=$arg
+		fi
+		
+		if [ $arg = '-o' ]; then
+			SKIP='O'
+		fi
+		
+		# Note each file ending by ${SUFFIX} and remember the last one
+		# Transform them in .o 
+		if `echo $arg | grep -q "${SUFFIX}$"`; then
+			LASTFILE=$arg
+			OUTPUT+=`echo $arg | sed "s/${SUFFIX}/\.o/"`
+			OUTPUT+=' '
+		fi
+	fi
+done
+
+# What is the output?
+
+if [ ${NAMED_OUTPUT}"X" != "X" ]; then
+	OUTPUT=$NAMED_OUTPUT
+
+elif [ $OUTPUT_O = 'NO' ]; then
+	# It is an executable whose is name is the LASTFILE without suffix
+	OUTPUT=`echo ${LASTFILE} | sed "s/${SUFFIX}//"`
+fi
+
+# Othewise, the output is just the ${OUTPUT} variable as computed before
+
+# For some reason, -dynamiclib and -lpython2.6 are missing when linking
+# .so files. Add them, except if -bundle is set (incompatible switches)
+if [ `echo $OUTPUT | sed -E 's|.*\.||'` = "so" ] && \
+	! `echo $NEWARGS | grep -q bundle`; then
+	NEWARGS="${NEWARGS} ${PREFIX}/lib/libpython2.6.dylib -dynamiclib"
+fi
+
+# Now, compile
+
+if [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'NO' ]; then
+	# No size indication given, just proceed with default
+	if `${COMPILER} $NEWARGS`; then
+		exit 0
+	else
+		exit 1
+	fi
+
+elif [ $SIZE32 = 'YES' ] && [ $SIZE64 = 'NO' ]; then
+	# 32-bit
+	if `${COMPILER} -m32 $NEWARGS`; then
+		exit 0
+	else
+		exit 1
+	fi
+	
+elif [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'YES' ]; then
+	# 64-bit
+	if `${COMPILER} -m64 $NEWARGS`; then
+		exit 0
+	else
+		exit 1
+	fi
+
+else
+	# Universal case
+	if `${COMPILER} -m32 $NEWARGS`; then
+		for filename in ${OUTPUT}
+		do
+			mv ${filename} ${filename}.32
+		done
+	
+		if `${COMPILER} -m64 $NEWARGS`; then
+			for filename in ${OUTPUT}
+			do
+				mv ${filename} ${filename}.64
+				if [ $INTEL = 'YES' ]; then
+					lipo -create -arch x86_64 ${filename}.64 \
+						 -arch i386 ${filename}.32 \
+			 			 -output ${filename}
+				else
+					lipo -create -arch ppc64 ${filename}.64 \
+						 -arch ppc ${filename}.32 \
+			 			 -output ${filename}
+				fi
+			
+				rm -f ${filename}.32 ${filename}.64
+			done
+		else
+			exit 1
+		fi
+	else
+		exit 1
+	fi
+fi
+exit 0


Property changes on: trunk/dports/python/py27-numpy/files/wrapper
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/dports/python/py27-scientific/Portfile
===================================================================
--- trunk/dports/python/py27-scientific/Portfile	                        (rev 0)
+++ trunk/dports/python/py27-scientific/Portfile	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,62 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem      1.0
+PortGroup       python27 1.0
+
+name            py27-scientific
+version         2.8
+revision        2
+categories      python science
+platforms       darwin
+maintainers     adfernandes openmaintainer
+description     Scientific Python
+
+long_description \
+    ScientificPython is a collection of Python modules that \
+    are useful for scientific computing.
+
+homepage        http://dirac.cnrs-orleans.fr/ScientificPython/
+master_sites    http://sourcesup.cru.fr/frs/download.php/2309/
+distname        ScientificPython-${version}
+
+checksums       md5 82d8592635d6ae8608b3073dacf9e694 \
+                sha1 c0847eac6359d70b0e4687c5c65af49b3986e55b \
+                rmd160 0501829586253fe3986458529c436b6d93e6667f
+
+depends_lib     port:netcdf \
+                port:py27-numpy
+
+build.env    	CPPFLAGS="-I${python.include} \
+	            -I${worksrcpath}/Include" \
+                NETCDF_PREFIX=${prefix}
+
+platform macosx {
+    post-extract {
+        copy -force ${filespath}/customize.py-macosx ${worksrcpath}/customize.py
+    }
+}
+
+platform puredarwin {
+    post-extract {
+        copy -force ${filespath}/customize.py-puredarwin ${worksrcpath}/customize.py
+    }
+}
+
+variant mpi description {Enable lammpi support} {
+    depends_lib-append  port:lammpi
+    patchfiles-append patch-Src-MPI-compile.py.diff
+    post-build {
+        reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/Src/MPI/compile.py
+        reinplace "s|@worksrcpath@|${worksrcpath}|g" ${worksrcpath}/Src/MPI/compile.py
+        system "cd ${worksrcpath}/Src/MPI && ${prefix}/bin/python${python.branch} compile.py"
+    }
+    post-destroot {
+        xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${python.prefix}/bin
+        ln -s ${python.prefix}/bin/mpipython ${destroot}${prefix}/bin/mpipython-${python.branch}
+    }
+}
+
+livecheck.type  regex
+livecheck.url   http://sourcesup.cru.fr/projects/scientific-py/
+livecheck.regex {<strong>Stable Releases</strong></td><td>(\d+(?:\.\d+)*)}


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

Added: trunk/dports/python/py27-scientific/files/customize.py-macosx
===================================================================
--- trunk/dports/python/py27-scientific/files/customize.py-macosx	                        (rev 0)
+++ trunk/dports/python/py27-scientific/files/customize.py-macosx	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,17 @@
+extra_compile_args = []
+extra_link_args = []
+include_dirs = []
+
+use_system_lapack = 1
+lapack_library_dirs = []
+lapack_libraries = []
+lapack_extra_link_args = ['-framework', 'vecLib']
+
+use_dotblas = 1
+use_system_blas = 1
+dotblas_include_dirs = []
+dotblas_cblas_header = '<vecLib/vBLAS.h>'
+dotblas_library_dirs = lapack_library_dirs
+dotblas_libraries = lapack_libraries
+dotblas_extra_link_args = ['-framework', 'vecLib']
+

Added: trunk/dports/python/py27-scientific/files/customize.py-puredarwin
===================================================================
--- trunk/dports/python/py27-scientific/files/customize.py-puredarwin	                        (rev 0)
+++ trunk/dports/python/py27-scientific/files/customize.py-puredarwin	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,17 @@
+extra_compile_args = []
+extra_link_args = []
+include_dirs = []
+
+use_system_lapack = 1
+lapack_library_dirs = []
+lapack_libraries = []
+lapack_extra_link_args = ['-framework', 'vecLib']
+
+use_dotblas = 0
+use_system_blas = 0
+dotblas_include_dirs = []
+dotblas_cblas_header = '<vecLib/vBLAS.h>'
+dotblas_library_dirs = lapack_library_dirs
+dotblas_libraries = lapack_libraries
+dotblas_extra_link_args = ['-framework', 'vecLib']
+

Added: trunk/dports/python/py27-scientific/files/patch-Src-MPI-compile.py.diff
===================================================================
--- trunk/dports/python/py27-scientific/files/patch-Src-MPI-compile.py.diff	                        (rev 0)
+++ trunk/dports/python/py27-scientific/files/patch-Src-MPI-compile.py.diff	2010-07-13 15:59:37 UTC (rev 69687)
@@ -0,0 +1,42 @@
+--- Src/MPI/compile.py.orig	2009-10-13 18:42:27.000000000 +0400
++++ Src/MPI/compile.py	2009-10-13 18:42:40.000000000 +0400
+@@ -5,7 +5,6 @@
+ import distutils
+ import distutils.sysconfig
+ import os, sys
+-from Scientific import N
+ 
+ cfgDict = distutils.sysconfig.get_config_vars()
+ 
+@@ -14,11 +13,10 @@
+ sources='mpipython.c Scientific_mpi.c'
+ 
+ extra_compile_args = ""
+-if N.package == "NumPy":
+-    arrayobject_h_include = os.path.join(sys.prefix,
+-                            "lib/python%s.%s/site-packages/numpy/core/include"
+-                                          % sys.version_info [:2])
+-    extra_compile_args = "-DNUMPY=1 -I"+arrayobject_h_include
++arrayobject_h_include = os.path.join(sys.prefix,
++                        "lib/python%s.%s/site-packages/numpy/core/include"
++                                      % sys.version_info [:2])
++extra_compile_args = "-DNUMPY=1 -I"+arrayobject_h_include
+ 
+ linkforshared = cfgDict['LINKFORSHARED']
+ if sys.platform == 'darwin':
+@@ -32,14 +30,12 @@
+             items[i] = os.path.join(frameworkdir[0], items[i])
+     linkforshared = ' '.join(items)
+ 
+-cmd = '%s %s -o mpipython -I%s %s %s -L%s -lpython%s %s %s' % \
++cmd = '%s %s -o mpipython -Wl,-search_paths_first @prefix@/lib/libmpi.a @prefix@/lib/liblam.a -I at worksrcpath@/Include -I%s %s %s %s %s' % \
+     (mpicompiler, 
+      linkforshared,
+      cfgDict['INCLUDEPY'],
+      extra_compile_args,
+      sources,
+-     cfgDict['LIBPL'],
+-     cfgDict['VERSION'], 
+      cfgDict['LIBS'], 
+      cfgDict['LIBM'])
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100713/5036af7a/attachment-0001.html>


More information about the macports-changes mailing list