mirror of https://gitee.com/openkylin/libvirt.git
Fri Nov 30 11:04:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* python/libvir.c, python/libvir.py: Make Python aware that the C bindings module is called cygvirtmod.dll when compiled by CYGWIN. * python/Makefile.am: Remove symlink libvirtmod.dll -> cygvirtmod.dll no longer necessary because of the above. * configure.in: Remove AM_CONDITIONAL(CYGWIN).
This commit is contained in:
parent
d63034c018
commit
2ac691d60e
|
@ -1,3 +1,12 @@
|
||||||
|
Fri Nov 30 11:04:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
|
||||||
|
* python/libvir.c, python/libvir.py: Make Python aware that
|
||||||
|
the C bindings module is called cygvirtmod.dll when compiled
|
||||||
|
by CYGWIN.
|
||||||
|
* python/Makefile.am: Remove symlink libvirtmod.dll -> cygvirtmod.dll
|
||||||
|
no longer necessary because of the above.
|
||||||
|
* configure.in: Remove AM_CONDITIONAL(CYGWIN).
|
||||||
|
|
||||||
Thu Nov 29 17:40:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
|
Thu Nov 29 17:40:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
|
||||||
* configure.in: Added CYGWIN_EXTRA_LDFLAGS, CYGWIN_EXTRA_LIBADD,
|
* configure.in: Added CYGWIN_EXTRA_LDFLAGS, CYGWIN_EXTRA_LIBADD,
|
||||||
|
|
|
@ -539,13 +539,11 @@ fi
|
||||||
dnl Extra link-time flags for Cygwin.
|
dnl Extra link-time flags for Cygwin.
|
||||||
dnl Copied from libxml2 configure.in, but I removed mingw changes
|
dnl Copied from libxml2 configure.in, but I removed mingw changes
|
||||||
dnl for now since I'm not supporting mingw at present. - RWMJ
|
dnl for now since I'm not supporting mingw at present. - RWMJ
|
||||||
cygwin=
|
|
||||||
CYGWIN_EXTRA_LDFLAGS=
|
CYGWIN_EXTRA_LDFLAGS=
|
||||||
CYGWIN_EXTRA_LIBADD=
|
CYGWIN_EXTRA_LIBADD=
|
||||||
CYGWIN_EXTRA_PYTHON_LIBADD=
|
CYGWIN_EXTRA_PYTHON_LIBADD=
|
||||||
case "$host" in
|
case "$host" in
|
||||||
*-*-cygwin*)
|
*-*-cygwin*)
|
||||||
cygwin=yes
|
|
||||||
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
|
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
|
||||||
CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
|
CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
|
||||||
if test "x$PYTHON_VERSION" != "x"; then
|
if test "x$PYTHON_VERSION" != "x"; then
|
||||||
|
@ -556,7 +554,6 @@ esac
|
||||||
AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
|
AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
|
||||||
AC_SUBST(CYGWIN_EXTRA_LIBADD)
|
AC_SUBST(CYGWIN_EXTRA_LIBADD)
|
||||||
AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
|
AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
|
||||||
AM_CONDITIONAL(CYGWIN,[test "x$cygwin" = "xyes"])
|
|
||||||
|
|
||||||
# very annoying
|
# very annoying
|
||||||
rm -f COPYING
|
rm -f COPYING
|
||||||
|
|
|
@ -63,13 +63,6 @@ install-data-local:
|
||||||
@(for doc in $(DOCS) ; \
|
@(for doc in $(DOCS) ; \
|
||||||
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
||||||
|
|
||||||
if CYGWIN
|
|
||||||
install-data-hook:
|
|
||||||
cd $(DESTDIR)$(pythondir) && \
|
|
||||||
rm -f libvirtmod.dll && \
|
|
||||||
ln -s cygvirtmod.dll libvirtmod.dll
|
|
||||||
endif
|
|
||||||
|
|
||||||
uninstall-local:
|
uninstall-local:
|
||||||
rm -f $(DESTDIR)$(pythondir)/libvirt.py
|
rm -f $(DESTDIR)$(pythondir)/libvirt.py
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,11 @@
|
||||||
#include "libvirt_wrap.h"
|
#include "libvirt_wrap.h"
|
||||||
#include "libvirt-py.h"
|
#include "libvirt-py.h"
|
||||||
|
|
||||||
|
#ifndef __CYGWIN__
|
||||||
extern void initlibvirtmod(void);
|
extern void initlibvirtmod(void);
|
||||||
|
#else
|
||||||
|
extern void initcygvirtmod(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
PyObject *libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
|
PyObject *libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
|
||||||
PyObject *libvirt_virNetworkGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
|
PyObject *libvirt_virNetworkGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
|
||||||
|
@ -752,7 +756,12 @@ static PyMethodDef libvirtMethods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initlibvirtmod(void)
|
#ifndef __CYGWIN__
|
||||||
|
initlibvirtmod
|
||||||
|
#else
|
||||||
|
initcygvirtmod
|
||||||
|
#endif
|
||||||
|
(void)
|
||||||
{
|
{
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
|
|
||||||
|
@ -762,7 +771,13 @@ initlibvirtmod(void)
|
||||||
virInitialize();
|
virInitialize();
|
||||||
|
|
||||||
/* intialize the python extension module */
|
/* intialize the python extension module */
|
||||||
Py_InitModule((char *) "libvirtmod", libvirtMethods);
|
Py_InitModule((char *)
|
||||||
|
#ifndef __CYGWIN__
|
||||||
|
"libvirtmod"
|
||||||
|
#else
|
||||||
|
"cygvirtmod"
|
||||||
|
#endif
|
||||||
|
, libvirtMethods);
|
||||||
|
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,13 @@
|
||||||
# Check python/generator.py in the source distribution of libvir
|
# Check python/generator.py in the source distribution of libvir
|
||||||
# to find out more about the generation process
|
# to find out more about the generation process
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# On cygwin, the DLL is called cygvirtmod.dll
|
||||||
|
try:
|
||||||
import libvirtmod
|
import libvirtmod
|
||||||
|
except:
|
||||||
|
import cygvirtmod as libvirtmod
|
||||||
|
|
||||||
import types
|
import types
|
||||||
|
|
||||||
# The root of all libvirt errors.
|
# The root of all libvirt errors.
|
||||||
|
|
Loading…
Reference in New Issue