Ok, I had a go at testing this on Windows, but I hit a couple of problems (no doubt due to my rather weak Python knowledge).
Firstly, I couldn't get it to build in debug more as it was searching for python26_d.lib, whereas only python26.lib exists. I'm sure we can fix that in CMake.
Secondly, it did build in release mode but I couldn't manage to use it. It generated four files:
- _PolyVoxCore.exp
- _PolyVoxCore.lib
- _polyvoxcore.pdb
- _PolyVoxCore.pyd
I copied all of these into C:\Python26\Lib\site-packages and ran Idle. It went like this:
Code:
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************
IDLE 2.6.4
>>> import PolyVoxCore as pv
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import PolyVoxCore as pv
ImportError: No module named PolyVoxCore
>>>
>>> import _PolyVoxCore as pv
>>>
>>> v = pv.Vector3DInt32(0,0,0)
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
v = pv.Vector3DInt32(0,0,0)
AttributeError: 'module' object has no attribute 'Vector3DInt32'
>>>
I'm not sure why I need the leading underscore to import the library (that's probably a sign of a problem) or why I can't create the class.
However, when I type 'pv.' I see Python's version of Intellisense pop up:
It looks like it can see the member functions, but not the actual class? Any ideas?