|
From: Matthew B. <mat...@gm...> - 2006-01-31 17:00:06
|
Hi,
I have the latest version of Mandrake, which has no g77, only gfortran
- and needed the following patch to compile (with some added g77,
gfortran outputs):
Index: numpy/distutils/fcompiler/gnu.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- numpy/distutils/fcompiler/gnu.py (revision 2033)
+++ numpy/distutils/fcompiler/gnu.py (working copy)
@@ -20,8 +20,13 @@
# GNU Fortran (GCC) 3.3.3 (Debian 20040401)
# GNU Fortran 0.5.25 20010319 (prerelease)
# Redhat: GNU Fortran (GCC 3.2.2 20030222 (Red Hat Linux
3.2.2-5)) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
+ # Mandrake: GNU Fortran (GCC) 3.3.6 (Mandrakelinux release 3.3.6-2mdk)
+ #
+ # 'gfortran --version' results
+ # Redhat: GNU Fortran 95 (GCC 4.0.2 20051125 (Red Hat 4.0.2-8))
+ # Mandrake: GNU Fortran 95 (GCC 4.0.1 (4.0.1-5mdk for Mandriva
Linux release 2006.0))
- for fc_exe in map(find_executable,['g77','f77']):
+ for fc_exe in map(find_executable,['g77','f77','gfortran']):
if os.path.isfile(fc_exe):
break
executables =3D {
@@ -41,7 +46,10 @@
if os.name !=3D 'nt' and sys.platform!=3D'cygwin':
pic_flags =3D ['-fPIC']
- g2c =3D 'g2c'
+ if os.path.basename(fc_exe) =3D=3D 'gfortran':
+ g2c =3D 'gfortran'
+ else:
+ g2c =3D 'g2c'
#def get_linker_so(self):
# # win32 linking should be handled by standard linker
Can I suggest this a patch to svn numpy?
Thanks,
Matthew
|