1 diff -urN numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h
2 --- numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h 2007-11-07 22:05:15.000000000 +0000
3 +++ numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h 2008-05-25 11:07:14.000000000 +0100
5 #elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__)
7 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
9 +#include "fenv/fenv.h"
10 #elif defined(__CYGWIN__)
11 #include "fenv/fenv.c"
13 diff -urN numpy-1.0.4/numpy/core/setup.py numpy-1.0.4.patched/numpy/core/setup.py
14 --- numpy-1.0.4/numpy/core/setup.py 2007-11-07 22:06:43.000000000 +0000
15 +++ numpy-1.0.4.patched/numpy/core/setup.py 2008-05-25 11:07:14.000000000 +0100
18 def generate_config_h(ext, build_dir):
19 target = join(build_dir,'config.h')
20 + log.info("-----------------------abc")
21 if newer(__file__,target):
22 config_cmd = config.get_config_cmd()
23 log.info('Generating %s',target)
29 if nosmp: moredefs = [('NPY_ALLOW_THREADS', '0')]
33 target_f.write('#define %s\n' % (d))
35 target_f.write('#define %s %s\n' % (d[0],d[1]))
36 - if not nosmp: # default is to use WITH_THREAD
37 - target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n')
38 + log.info("-----------------------abc")
39 + #if not nosmp: # default is to use WITH_THREAD
40 + target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n')
43 target_f = open(target)
44 diff -urN numpy-1.0.4/numpy/distutils/unixccompiler.py numpy-1.0.4.patched/numpy/distutils/unixccompiler.py
45 --- numpy-1.0.4/numpy/distutils/unixccompiler.py 2007-11-07 22:05:15.000000000 +0000
46 +++ numpy-1.0.4.patched/numpy/distutils/unixccompiler.py 2008-05-25 11:07:14.000000000 +0100
48 from numpy.distutils.ccompiler import replace_method
51 +def UnixCCompiler__link_executable (self,
57 + runtime_library_dirs=None,
60 + extra_postargs=None,
62 + if output_progname == "_configtest":
63 + self.spawn(['gcc', '-lm', '-o',output_progname]+objects, display = "")
65 + print "#### Running " + str(CCompiler.EXECUTABLE)
66 + self.link(CCompiler.EXECUTABLE, objects,
67 + self.executable_filename(output_progname), output_dir,
68 + libraries, library_dirs, runtime_library_dirs, None,
69 + debug, extra_preargs, extra_postargs+ ['-lm'], None, target_lang)
71 +replace_method(UnixCCompiler, 'link_executable', UnixCCompiler__link_executable)
73 # Note that UnixCCompiler._compile appeared in Python 2.3
74 def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
75 display = '%s: %s' % (os.path.basename(self.compiler_so[0]),src)
77 + if src == "_configtest.c":
78 + self.spawn(['gcc', '-fwrapv', '-O2', '-Wall', '-Wstrict-prototypes', '-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-I/umc/blogic/olpc/staging_dir/i386/usr/include/python2.5','-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-fPIC'] + cc_args + [src, '-o', obj] +
79 + extra_postargs, display = display)
81 self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
82 extra_postargs, display = display)
83 except DistutilsExecError, msg:
84 diff -urN numpy-1.0.4/numpy/numarray/_capi.c numpy-1.0.4.patched/numpy/numarray/_capi.c
85 --- numpy-1.0.4/numpy/numarray/_capi.c 2007-11-07 22:05:16.000000000 +0000
86 +++ numpy-1.0.4.patched/numpy/numarray/_capi.c 2008-05-25 11:07:14.000000000 +0100
90 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
92 +#include "numpy/fenv/fenv.h"
93 #elif defined(__CYGWIN__)
94 #include "numpy/fenv/fenv.h"
95 #include "numpy/fenv/fenv.c"
96 diff -urN numpy-1.0.4.p2/numpy/core/setup.py numpy-1.0.4/numpy/core/setup.py
97 --- numpy-1.0.4.p2/numpy/core/setup.py 2008-05-25 11:18:19.000000000 +0100
98 +++ numpy-1.0.4/numpy/core/setup.py 2008-05-25 11:18:52.000000000 +0100
100 from distutils.dep_util import newer
102 FUNCTIONS_TO_CHECK = [
103 - ('expl', 'HAVE_LONGDOUBLE_FUNCS'),
104 ('expf', 'HAVE_FLOAT_FUNCS'),
105 ('log1p', 'HAVE_LOG1P'),
106 ('expm1', 'HAVE_EXPM1'),
107 ('asinh', 'HAVE_INVERSE_HYPERBOLIC'),
108 ('atanhf', 'HAVE_INVERSE_HYPERBOLIC_FLOAT'),
109 - ('atanhl', 'HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE'),
110 ('isnan', 'HAVE_ISNAN'),
111 ('isinf', 'HAVE_ISINF'),
112 ('rint', 'HAVE_RINT'),