[Numpy-discussion] [PATCH] F2Py on Python 3
Charles R Harris
charlesr.harris at gmail.com
Thu Sep 23 22:34:44 EDT 2010
On Thu, Sep 23, 2010 at 7:22 PM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> On 23 September 2010 01:26, Charles R Harris <charlesr.harris at gmail.com>
> wrote:
> >
> >
> > On Wed, Sep 22, 2010 at 10:00 PM, Charles R Harris
> > <charlesr.harris at gmail.com> wrote:
> >>
> >>
> >> On Wed, Sep 22, 2010 at 9:14 PM, Fernando Perez <fperez.net at gmail.com>
> >> wrote:
> >>>
> >>> On Wed, Sep 22, 2010 at 7:16 PM, Charles R Harris
> >>> <charlesr.harris at gmail.com> wrote:
> >>> >
> >>> > Done in 29cccb6.
> >>> >
> >>>
> >>> Mmh, I think it broke something:
> >>>
> >>> File
> >>> "/home/fperez/tmp/src/scipy/numpy/numpy/distutils/command/build.py",
> >>> line 37, in run
> >>> old_build.run(self)
> >>> File "/usr/lib/python2.6/distutils/command/build.py", line 135, in run
> >>> self.run_command(cmd_name)
> >>> File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
> >>> self.distribution.run_command(command)
> >>> File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
> >>> cmd_obj.run()
> >>> File
> >>>
> "/home/fperez/tmp/src/scipy/numpy/numpy/distutils/command/build_scripts.py",
> >>> line 39, in run
> >>> self.scripts = self.generate_scripts(self.scripts)
> >>> File
> >>>
> "/home/fperez/tmp/src/scipy/numpy/numpy/distutils/command/build_scripts.py",
> >>> line 24, in generate_scripts
> >>> script = func(build_dir)
> >>> File "numpy/f2py/setup.py", line 78, in generate_f2py_py
> >>> '''%(os.path.basename(sys.executable)))
> >>> TypeError: not enough arguments for format string
> >>>
> >>> If I revert to the previous commit, it installs fine again.
> >>>
> >>
> >> I wondered about that, it is probably the old `mode` vs plain old mode.
> I
> >> had just hoped it was tested. Can you check that out?
> >>
> >
> > Should be fixed in 8f6114b.
> >
>
> I had just hoped it was tested... [sorry, I could not resist! ;-) ]
>
> diff --git a/numpy/f2py/setup.py b/numpy/f2py/setup.py
> index aac3d33..37aab19 100644
> --- a/numpy/f2py/setup.py
> +++ b/numpy/f2py/setup.py
> @@ -62,7 +62,7 @@ for mode in ["g3-numpy", "2e-numeric",
> "2e-numarray", "2e-numpy
> except ValueError: pass
> os.environ["NO_SCIPY_IMPORT"]="f2py"
> if mode=="g3-numpy":
> - sys.stderr.write("G3 f2py support is not implemented, yet.\n")
> + sys.stderr.write("G3 f2py support is not implemented, yet.\\n")
> sys.exit(1)
> elif mode=="2e-numeric":
> from f2py2e import main
> @@ -72,7 +72,7 @@ elif mode=="2e-numarray":
> elif mode=="2e-numpy":
> from numpy.f2py import main
> else:
> - sys.stderr.write("Unknown mode: " + repr(mode) + "\n")
> + sys.stderr.write("Unknown mode: " + repr(mode) + "\\n")
> sys.exit(1)
> main()
> '''%(os.path.basename(sys.executable)))
>
>
Arrggghhhh, I forgot the double backslashes :-(
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100923/cf3211c8/attachment.html>
More information about the NumPy-Discussion
mailing list