Bug in Panda3d 1.9.4 importer? Built .p3d crashes now!

[EDITED for clarity]

I’m on windows 8.1 64 bit OS, but trying to run 32bit panda3d here.

On 1.8.1 I had an installer builder working using ppackage and a sick little pdef file, but when I upgrade to 1.9.4 it crashes on some import statements. I cannot upgrade to 1.10 and use deploy-ng right now because its not mature enough with 3rd party libraries. If I go back to 1.8.1 my GLSL shaders don’t work since p3d_Color doesn’t seem to register any of the vertex colors.

Anyhow, In my source tree I have file structure such as:

main.py
other_files/
    __init__.py
    __init__.pyc
    demo/
        __init__.py
        __init__.pyc
        panel.py
        panel.pyc

So in my other_files/demo/init.py file I have line

import panel

right?

Panel.py contains wxPython classes. When Moving to 1.9.4 I upgraded from wxPython 2.8.x to 3.0.x

When I build my .p3d file, I can see the contents of the .p3d file include:

other_files/demo.pyo
other_files/demo/__init__.pyo
other_files/demo/panel.pyo

And when I run the .p3d with panda3d.exe I get an error at that line saying

ImportError:'No module named panel'

Ok, so I set a debug trace at the line right before the import, and I step into it when running the .p3d file, I get into vfsimport:336

I print out the variable ‘fullname’ and it reads

>>> print fullname
'other_files.panel'

But when I step into it from the .p3d built by 1.8.1 I get

>>> print fullname
'other_files.demo.panel'

I should probably mention that my importer was modified in my source code.

So there’s a file that does this:

import __builtin__
_builtinImport=__builtin__.__import__

def _newImport(*args,**kwargs):
    name=args[0]
    s=name.split('.')
    if s[0]=='my_lib':
        try:
            r=_builtinImport(*args,**kwargs)
            apisImported.append(name)
            return r
        except ImportError, e:
            apisMissing.append(name)
            raise
    elif s[0]=='other_files' and len(s)>1:
        r=pluginImporter(s[1],*args,**kwargs)
        return r
    else:
        r=_builtinImport(*args,**kwargs)
        return r

__builtin__.__import__=_newImport

And so whenever I call ‘import module’ its actually calling ‘_newImport(args…)’

In addition, when I look at the contents of the .p3d file built with 1.8.1 I see a bunch of files like

folder/subfolder/AVIFIL32.DLL
folder/subfolder/MSVCP90.dll
folder/subfolder/avcodec-53.dll
folder/subfolder/avformat-53.dll
folder/subfolder/avutil-51.dll
folder/subfolder/cg.dll
folder/subfolder/file_pb2.pyo
folder/subfolder/libp3dtool.dll
folder/subfolder/libp3dtool.dll.manifest
folder/subfolder/libp3dtoolconfig.dll
folder/subfolder/libp3dtoolconfig.dll.manifest
folder/subfolder/libpanda.dll
folder/subfolder/libpanda.dll.manifest
folder/subfolder/libpandaexpress.dll
folder/subfolder/libpandaexpress.dll.manifest

But these are not in the .p3d built by 1.9.4

Could someone point out to me what parts of the source are involved in ppackage / pdeploy? Either that or the code that handles shaders (GLSL)? I’m wondering, would it be hard to make a custom build that combines the packaging system of 1.8.1 with the GLSL shader handling of 1.9.4? I’ve tried building with the 1.8.1 ppackage.exe but with panda3d 1.9.4 otherwise. Anyhow, I’m trying to get a commercial release out sooner than later for windows, i.e. hopefully in the next couple days IF possible. Not the end of the world if its not met, but sooner is better.

I’ve also been thinking about moving to deploy-ng, but I need to use wxPython.

Anyone got any advice or tips on what I could do?

I’m still trying to reproduce this error in a minimalistic, runable code example that I can post here. Would debuging something like this be something you all would be willing to do or should I get a deploy-ng example crashing and we work with that?