Skip to content

Conversation

pmp-p
Copy link

@pmp-p pmp-p commented Feb 22, 2018

interrogate_module.cpp should contains :

PyObject *module = Dtool_PyModuleInitHelper(defs, "panda3d.lui");

actually is:

PyObject *module = Dtool_PyModuleInitHelper(defs, "lui");

interrogate_module.cpp should contains :

  PyObject *module = Dtool_PyModuleInitHelper(defs, "panda3d.lui");

actually is:

  PyObject *module = Dtool_PyModuleInitHelper(defs, "lui");
@tobspr
Copy link
Owner

tobspr commented Feb 22, 2018

Hm, I don't think this works since the module builder is also used for other modules besides of LUI, so that this would break them. I believe there should be an option to add the panda3d prefix? So that modules which are supposed to be added to the panda3d installation have that prefix, and others don't

@pmp-p
Copy link
Author

pmp-p commented Feb 23, 2018

maybe add a flag then, at least for LUI case ?
i am currently modifying the cmake script to handle standalone python 3.7 and panda3d on android 4.4 ( linux cross build passed) i am about to test functionnality so not a problem to add specific force module name from env.

@tobspr
Copy link
Owner

tobspr commented Feb 24, 2018

Okay, so it seems this is android specifc? Or does this also affect windows / linux builds? Should the prefix appear on all platforms?

@pmp-p
Copy link
Author

pmp-p commented Feb 25, 2018

i think the .__name__ of a module should be defined by an env e.g. "MODULE_FQN" for all platforms.
the lui case is straightforward :
as panda3d.core.__name__ == 'panda3d.core'

it should be settable so we'll have panda3d.lui.__name__ == 'panda3d.lui'

Actually P3DModuleBuilder can't do that.

and to comply with multi_lib specs of py3 you should allow an override of the soname ( because autodetect from python host could lead to arch triple error when cross compiling )
so you get for example : lui.cpython-34m-x86_64-linux-gnu.so

@tobspr
Copy link
Owner

tobspr commented Feb 26, 2018

Wouldn't it be better to make the module builder automatically prefix "panda3d." when it detects that this is required? I'd prefer if this could happen automatically instead of having to set an environment variable.

How would you like to be able to override the name of the generated binary? Maybe with a pattern string? E.g. output_name=%module%-%pythonver%-%platform%.so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants