[Python-modules-commits] r23111 - in packages/scipy/trunk/debian (3 files)

jtaylor-guest at users.alioth.debian.org jtaylor-guest at users.alioth.debian.org
Thu Nov 29 22:34:45 UTC 2012


    Date: Thursday, November 29, 2012 @ 22:34:44
  Author: jtaylor-guest
Revision: 23111

interpnd-generator.patch: fix the interpnd.pyx generation

actually using the generator would require a build dependency on
python-mako

Added:
  packages/scipy/trunk/debian/patches/interpnd-generator.patch
Modified:
  packages/scipy/trunk/debian/changelog
  packages/scipy/trunk/debian/patches/series

Modified: packages/scipy/trunk/debian/changelog
===================================================================
--- packages/scipy/trunk/debian/changelog	2012-11-29 22:34:33 UTC (rev 23110)
+++ packages/scipy/trunk/debian/changelog	2012-11-29 22:34:44 UTC (rev 23111)
@@ -2,6 +2,7 @@
 
   * add missing cython sources from git tag (Closes: #589731)
   * update debian/orig-tar.sh appropriately
+  * interpnd-generator.patch: fix the interpnd.pyx generation
 
  -- Julian Taylor <jtaylor.debian at googlemail.com>  Thu, 29 Nov 2012 21:56:31 +0100
 

Added: packages/scipy/trunk/debian/patches/interpnd-generator.patch
===================================================================
--- packages/scipy/trunk/debian/patches/interpnd-generator.patch	                        (rev 0)
+++ packages/scipy/trunk/debian/patches/interpnd-generator.patch	2012-11-29 22:34:44 UTC (rev 23111)
@@ -0,0 +1,40 @@
+From 7d1ecbd42db21f0ca50ab23999756c34c1d77723 Mon Sep 17 00:00:00 2001 
+From: Pauli Virtanen <pav at iki.fi>
+Date: Sun, 4 Mar 2012 01:48:00 +0100
+Description: needed so we can regenerate the pyx file
+
+---
+ scipy/interpolate/generate_interpnd.py |   15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+--- a/scipy/interpolate/generate_interpnd.py
++++ b/scipy/interpolate/generate_interpnd.py
+@@ -8,21 +8,20 @@
+ 
+ from mako.template import Template
+ 
+-f = open('interpnd.pyx', 'r')
++f = open('interpnd.pyx.in', 'r')
+ template = f.read()
+ f.close()
+ 
++# Run templating engine
++f = open('interpnd.pyx', 'w')
++f.write(Template(template).render())
++f.close()
++
+ tmp_dir = tempfile.mkdtemp()
+ try:
+-    # Run templating engine
+-    fn = os.path.join(tmp_dir, 'interpnd.pyx')
+-    f = open(fn, 'w')
+-    f.write(Template(template).render())
+-    f.close()
+-
+     # Run Cython
+     dst_fn = os.path.join(tmp_dir, 'interpnd.c')
+-    ret = subprocess.call(['cython', '-I', '../..', '-o', dst_fn, fn])
++    ret = subprocess.call(['cython', '-I', '../..', '-o', dst_fn, 'interpnd.pyx'])
+     if ret != 0:
+         sys.exit(ret)
+ 

Modified: packages/scipy/trunk/debian/patches/series
===================================================================
--- packages/scipy/trunk/debian/patches/series	2012-11-29 22:34:33 UTC (rev 23110)
+++ packages/scipy/trunk/debian/patches/series	2012-11-29 22:34:44 UTC (rev 23111)
@@ -4,3 +4,4 @@
 restore_sys_argv.patch
 blitz++.patch
 up_minpack_ints.diff
+interpnd-generator.patch




More information about the Python-modules-commits mailing list