$OpenBSD: patch-numpy_f2py_f2py2e_py,v 1.1 2014/02/09 13:32:40 jasper Exp $

Security fix for CVE-2014-1859, insecure temporary file use
https://github.com/numpy/numpy/commit/0bb46c1448b0d3f5453d5182a17ea7ac5854ee15

--- numpy/f2py/f2py2e.py.orig	Sat May  7 22:13:13 2011
+++ numpy/f2py/f2py2e.py	Sun Feb  9 14:14:01 2014
@@ -92,7 +92,7 @@ Options:
                    --lower is assumed with -h key, and --no-lower without -h key.
 
   --build-dir <dirname>  All f2py generated files are created in <dirname>.
-                   Default is tempfile.mktemp().
+                   Default is tempfile.mkdtemp().
 
   --overwrite-signature  Overwrite existing signature file.
 
@@ -426,7 +426,7 @@ def run_compile():
         del sys.argv[i]
     else:
         remove_build_dir = 1
-        build_dir = os.path.join(tempfile.mktemp())
+        build_dir = tempfile.mkdtemp()
 
     sysinfo_flags = filter(re.compile(r'[-][-]link[-]').match,sys.argv[1:])
     sys.argv = filter(lambda a,flags=sysinfo_flags:a not in flags,sys.argv)
