Hi all,

I am trying to compile a python package for Nuke via Cython.
All seems to work well on osx and linux, but on windows I get this error when trying to import the main module from within Nuke (i.e. the parent folder of the main module is added via nuke.pluginAddPath() which shoudl also add it to PYTHONPATH):
    ImportError: DLL load failed

When I try to import the module in the systems python terminal I get an error complaining about a missing MSVCR120.dll. However, if I make sure the python terminal's work directory is the parent folder of the main module, I can successfully import it.

I assume I am not compiling the extensions with the correct dependencies or something?

My setup.py file looks like this (using setuptools 30.4.0):

   import shutil
   from setuptools import setup
   from setuptools import Extension

   from Cython.Build import cythonize
   from Cython.Distutils import build_ext

   sourceFiles = ['path/to/packageA/moduleA.py',
                           path/to/packageB/moduleB.py',
                           path/to/packageC/moduleC.py',
                         ]

   ################ COMPILE
   setup (
        ext_modules = cythonize(sourceFiles),
        #packages = ['model', 'view', 'controller'],
        package_dir = {'A':'path/to/packageA',
                       'B':'path/to/packageB',
                       'C':'path/to/packageC'},
        #package_data = {'packageA':'__init__.py'}
   )

And the command to run it is simply:
python setup.py build_ext --inplace

I have never seriously tried to compile python code and I usually don't use windows either, so I'm sure it's a newbie mistake.
Any help would be greatly appreciated!

Cheers,
frank


--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing <http://ohufx.com/index.php/vfx-compositing> | *workflow customisation and consulting <http://ohufx.com/index.php/vfx-customising>* *

_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to