mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-06-13 19:21:37 +03:00
added the 'usual' setup.py to allow building a libxml2-python module based
* python/README python/generator.py python/libxml.c python/setup.py: added the 'usual' setup.py to allow building a libxml2-python module based on the same code. The initialization is however different the 2 .so files fo libxml2 and libxslt are identical and they entry point initialize both libraries. this is done to avoid some possible nasty problem since the Python don't merge the maps of all shared modules. Daniel
This commit is contained in:
@ -4,6 +4,9 @@
|
||||
* entry points where an automatically generated stub is either
|
||||
* unpractical or would not match cleanly the Python model.
|
||||
*
|
||||
* If compiled with MERGED_MODULES, the entry point will be used to
|
||||
* initialize both the libxml2 and the libxslt wrappers
|
||||
*
|
||||
* See Copyright for the status of this software.
|
||||
*
|
||||
* daniel@veillard.com
|
||||
@ -1418,9 +1421,16 @@ static PyMethodDef libxmlMethods[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
#ifdef MERGED_MODULES
|
||||
extern void initlibxml2mod(void);
|
||||
#endif
|
||||
|
||||
void initlibxml2mod(void) {
|
||||
PyObject *m;
|
||||
m = Py_InitModule("libxml2mod", libxmlMethods);
|
||||
libxml_xmlErrorInitialize();
|
||||
#ifdef MERGED_MODULES
|
||||
initlibxsltmod();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user