|
From: Guy K. K. <g....@ma...> - 2009-04-30 02:44:45
|
On Thu, 30 Apr 2009 06:29:23 Bruce Sherwood wrote: > I was able to build Visual 5 on ubuntu 9.04 without having to make this > change, as I happened to pick Boost 1.35 in the package manager, which > apparently doesn't have this bug, but I had to make this change on Windows > using Boost 1.38. Lenica, I've got some Jaunty packages compiled with Boost 1.35 here, but you need to resolve your dependencies manually, as they're built with checkinstall and don't contain any dependencies. But it still helps a lot to not have to build it yourself. https://gutefee.massey.ac.nz/moin/Python/3D FYI, configuring, building and creation of the package has been accomplished with these commands: /configure --prefix=/usr --disable-docs make -j 3 # I use a dual core, so I gain some speed though the "-j 3" sudo checkinstall --pkgname python-visual --pkgversion 5.0rc3 --pkglicense "Boost Public License" --maintainer "Guy K. Kloss \<g....@ma...\>" > On both Windows and ubuntu, when I build Visual for Python 2.6 and numpy > 1.3.0, I get a run-time failure on something that works on Python 2.5 with > numpy 1.2.1. There is a vector(double,double,double) class in Visual which > now fails if handed numpy.int32 arguments (works fine with numpy.float64 > arguments). I used Boost 1.35 with Python 2.5 and have used Boost 1.38 on > Windows and 1.35 on unbuntu. Here using python-numpy in version 1.2.1-1ubuntu1, which strangely enough works with Python 2.6 on Jaunty (1.3 is supposed to be the numpy version that works with Python 2.6). > This test routine fails: Indeed, never noticed ... In [1]: import numpy In [2]: import visual In [3]: xs = numpy.arange(0,10,1) In [4]: x = xs[1] In [5]: print type(x) <type 'numpy.int32'> In [6]: v = visual.vector(x,0,0) ArgumentError Traceback (most recent call last) /home/gkloss/<ipython console> in <module>() ArgumentError: Python argument types in vector.__init__(vector, numpy.int32, int, int) did not match C++ signature: __init__(_object*, cvisual::vector) __init__(_object*) __init__(_object*, double) __init__(_object*, double, double) __init__(_object*, double, double, double) > I've posted pleas for help on both the Boost and numpy mailing lists but > haven't gotten any replies. I would much appreciate suggestions for what to > do. Maybe you need to add another constructor to the C++ code containing integers? Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Room 2.63, Quad Block A Building Massey University, Auckland, Albany Private Bag 102 904, North Shore Mail Centre voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 eMail: G....@ma... http://iims.massey.ac.nz |