g95 detection not working
Hi all, at least on my setup (OS X, Python 2.4.1, latest svn of numpy and scipy), config_fc fails to recognize my g95 compiler, which was directly downloaded from http://g95.sourceforge.net/ (and always has failed, I think). This is because the current version string doesn't conform to the regexp pattern; the version string is """ G95 (GCC 4.0.3 (g95!) Apr 12 2006) Copyright (C) 2002-2005 Free Software Foundation, Inc. G95 comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of G95 under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING """ I've attached a patch below, although this identifies the version string with the date of the release, rather than the gcc version; I'm not sure which is the right one to use! Andrew --- numpy/distutils/fcompiler/g95.py (revision 2360) +++ numpy/distutils/fcompiler/g95.py (working copy) @@ -9,7 +9,7 @@ class G95FCompiler(FCompiler): compiler_type = 'g95' - version_pattern = r'G95.*\(experimental\) \(g95!\) (?P<version>.*)\).*' + version_pattern = r'G95.*\(g95!\) (?P<version>.*)\).*' executables = { 'version_cmd' : ["g95", "--version"],
Andrew Jaffe wrote:
Hi all,
at least on my setup (OS X, Python 2.4.1, latest svn of numpy and scipy), config_fc fails to recognize my g95 compiler, which was directly downloaded from http://g95.sourceforge.net/ (and always has failed, I think). This is because the current version string doesn't conform to the regexp pattern; the version string is """ G95 (GCC 4.0.3 (g95!) Apr 12 2006) Copyright (C) 2002-2005 Free Software Foundation, Inc.
G95 comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of G95 under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING """
I've attached a patch below, although this identifies the version string with the date of the release, rather than the gcc version; I'm not sure which is the right one to use!
We need the actual version number; in this case, "4.0.3". -- Robert Kern robert.kern@gmail.com "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Robert Kern wrote:
Andrew Jaffe wrote:
Hi all,
at least on my setup (OS X, Python 2.4.1, latest svn of numpy and scipy), config_fc fails to recognize my g95 compiler, which was directly downloaded from http://g95.sourceforge.net/ (and always has failed, I think). This is because the current version string doesn't conform to the regexp pattern; the version string is """ G95 (GCC 4.0.3 (g95!) Apr 12 2006) Copyright (C) 2002-2005 Free Software Foundation, Inc.
G95 comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of G95 under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING """
I've attached a patch below, although this identifies the version string with the date of the release, rather than the gcc version; I'm not sure which is the right one to use!
We need the actual version number; in this case, "4.0.3".
Thanks -- OK, in that case the following regexp works for me: version_pattern = r'G95.*\(GCC (?P<version>.*) \(g95!\)' But are there different versions of the version string? Also on an unrelated f2py note: is the f2py mailing list being read by the f2py developers? I've posted a question (about the status of F9x "types") without reply... Yours, Andrew
Andrew Jaffe wrote:
Thanks -- OK, in that case the following regexp works for me:
version_pattern = r'G95.*\(GCC (?P<version>.*) \(g95!\)'
But are there different versions of the version string?
Possibly. I don't really know.
Also on an unrelated f2py note: is the f2py mailing list being read by the f2py developers? I've posted a question (about the status of F9x "types") without reply...
Pearu is really the only f2py developer, and he has just flown from his home in Estonia to Austin to work with us at Enthought for a month. I presume he has been busy preparing for his journey. -- Robert Kern robert.kern@gmail.com "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Andrew Jaffe wrote:
Hi all,
at least on my setup (OS X, Python 2.4.1, latest svn of numpy and scipy), config_fc fails to recognize my g95 compiler, which was directly downloaded from http://g95.sourceforge.net/ (and always has failed, I think). This is because the current version string doesn't conform to the regexp pattern; the version string is """ G95 (GCC 4.0.3 (g95!) Apr 12 2006) Copyright (C) 2002-2005 Free Software Foundation, Inc.
G95 comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of G95 under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING """
I've attached a patch below, although this identifies the version string with the date of the release, rather than the gcc version; I'm not sure which is the right one to use!
Also, note that you can override the get_version() method entirely, if it's easier to do grab the version using something other than a regex. You can look at hpux.py and ibm.py for examples. -- Robert Kern robert.kern@gmail.com "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
participants (2)
-
Andrew Jaffe
-
Robert Kern