[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll



Cygwin likes to name DLLs as cyg<name>.dll.

This is very unhelpful for Python loadable modules because the init function name will be wrong and because it requires a change to the 'libvirt.py' file to load the right module name (import libvirtmod -> import cygvirtmod).

In this patch I've added a post-install hook to make a symlink so that Python finds libvirtmod.dll and all is happy.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: python/Makefile.am
===================================================================
RCS file: /data/cvs/libvirt/python/Makefile.am,v
retrieving revision 1.10
diff -u -r1.10 Makefile.am
--- python/Makefile.am	15 Nov 2007 13:04:28 -0000	1.10
+++ python/Makefile.am	29 Nov 2007 16:43:48 -0000
@@ -61,6 +63,13 @@
 	@(for doc in $(DOCS) ; \
 	   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:
 	rm -f $(DESTDIR)$(pythondir)/libvirt.py
 

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]