All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Rebuild python extensions if depends have changed
@ 2010-11-24 14:34 Juergen Gross
  2010-11-25 19:31 ` Ian Jackson
  2010-12-10 18:13 ` Ian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Juergen Gross @ 2010-11-24 14:34 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

Adds depends information for building python extensions.
The extensions depend on the library binaries they are using.

Signed-off-by: juergen.gross@ts.fujitsu.com





[-- Attachment #2: xen-work.patch --]
[-- Type: text/x-patch, Size: 5089 bytes --]

# HG changeset patch
# User Juergen Gross <juergen.gross@ts.fujitsu.com>
# Date 1290609232 -3600
# Node ID 5e8a8208ab964f6bfbd1f9cbd9f4786a2eb9a5be
# Parent  79b71c77907b80772ee8cba0c5bbf8e444e61226
Rebuild python extensions if depends have changed

Adds depends information for building python extensions.
The extensions depend on the library binaries they are using.

Signed-off-by: juergen.gross@ts.fujitsu.com

diff -r 79b71c77907b -r 5e8a8208ab96 tools/python/setup.py
--- a/tools/python/setup.py	Wed Nov 24 10:20:03 2010 +0000
+++ b/tools/python/setup.py	Wed Nov 24 15:33:52 2010 +0100
@@ -19,20 +19,28 @@
 
 libraries = [ "xenctrl", "xenguest", "xenstore" ]
 
+depends = [ XEN_ROOT + "/tools/libxc/libxenctrl.so",
+            XEN_ROOT + "/tools/libxc/libxenguest.so",
+            XEN_ROOT + "/tools/xenstore/libxenstore.so"
+            ]
+
 plat = os.uname()[0]
 if plat == 'Linux':
     uuid_libs = ["uuid"]
     blktap_ctl_libs = ["blktapctl"]
     library_dirs.append(XEN_ROOT + "/tools/blktap2/control")
+    blktab_ctl_depends = [ XEN_ROOT + "/tools/blktap2/control/libblktapctl.so" ]
 else:
     uuid_libs = []
     blktap_ctl_libs = []
+    blktab_ctl_depends = []
 
 xc = Extension("xc",
                extra_compile_args = extra_compile_args,
                include_dirs       = include_dirs + [ "xen/lowlevel/xc" ],
                library_dirs       = library_dirs,
                libraries          = libraries,
+               depends            = depends,
                sources            = [ "xen/lowlevel/xc/xc.c" ])
 
 xs = Extension("xs",
@@ -40,6 +48,7 @@
                include_dirs       = include_dirs + [ "xen/lowlevel/xs" ],
                library_dirs       = library_dirs,
                libraries          = libraries,
+               depends            = depends,
                sources            = [ "xen/lowlevel/xs/xs.c" ])
 
 scf = Extension("scf",
@@ -47,6 +56,7 @@
                include_dirs       = include_dirs + [ "xen/lowlevel/scf" ],
                library_dirs       = library_dirs,
                libraries          = libraries,
+               depends            = depends,
                sources            = [ "xen/lowlevel/scf/scf.c" ])
              
 process = Extension("process",
@@ -54,6 +64,7 @@
                include_dirs       = include_dirs + [ "xen/lowlevel/process" ],
                library_dirs       = library_dirs,
                libraries          = libraries + [ "contract" ],
+               depends            = depends,
                sources            = [ "xen/lowlevel/process/process.c" ])
 
 acm = Extension("acm",
@@ -61,6 +72,7 @@
                include_dirs       = include_dirs + [ "xen/lowlevel/acm" ],
                library_dirs       = library_dirs,
                libraries          = libraries,
+               depends            = depends,
                sources            = [ "xen/lowlevel/acm/acm.c" ])
 
 flask = Extension("flask",
@@ -69,6 +81,7 @@
                                         [ "../flask/libflask/include" ],
                library_dirs       = library_dirs + [ "../flask/libflask" ],
                libraries          = libraries + [ "flask" ],
+               depends            = depends + [ XEN_ROOT + "/tools/flask/libflask/libflask.so" ],
                sources            = [ "xen/lowlevel/flask/flask.c" ])
 
 ptsname = Extension("ptsname",
@@ -76,6 +89,7 @@
                include_dirs       = include_dirs + [ "ptsname" ],
                library_dirs       = library_dirs,
                libraries          = libraries,
+               depends            = depends,
                sources            = [ "ptsname/ptsname.c" ])
 
 checkpoint = Extension("checkpoint",
@@ -83,6 +97,7 @@
                        include_dirs       = include_dirs,
                        library_dirs       = library_dirs,
                        libraries          = libraries + [ "rt" ],
+                       depends            = depends,
                        sources            = [ "xen/lowlevel/checkpoint/checkpoint.c",
                                               "xen/lowlevel/checkpoint/libcheckpoint.c"])
 
@@ -91,6 +106,7 @@
                     include_dirs       = include_dirs,
                     library_dirs       = library_dirs,
                     libraries          = libraries,
+                    depends            = depends,
                     sources            = [ "xen/lowlevel/netlink/netlink.c",
                                            "xen/lowlevel/netlink/libnetlink.c"])
 
@@ -99,6 +115,8 @@
                include_dirs       = include_dirs + [ "xen/lowlevel/xl" ],
                library_dirs       = library_dirs,
                libraries          = libraries + ["xenlight" ] + blktap_ctl_libs + uuid_libs,
+               depends            = depends + blktab_ctl_depends +
+                                    [ XEN_ROOT + "/tools/libxl/libxenlight.so" ],
                sources            = [ "xen/lowlevel/xl/xl.c", "xen/lowlevel/xl/_pyxl_types.c" ])
 
 modules = [ xc, xs, ptsname, acm, flask, xl ]

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Rebuild python extensions if depends have changed
  2010-11-24 14:34 [PATCH] Rebuild python extensions if depends have changed Juergen Gross
@ 2010-11-25 19:31 ` Ian Jackson
  2010-11-26  5:57   ` Juergen Gross
  2010-12-10 18:13 ` Ian Jackson
  1 sibling, 1 reply; 4+ messages in thread
From: Ian Jackson @ 2010-11-25 19:31 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel

Juergen Gross writes ("[Xen-devel] [PATCH] Rebuild python extensions if depends have changed"):
> Adds depends information for building python extensions.
> The extensions depend on the library binaries they are using.

Can you explain what the impact of this patch is, for those of us who
don't understand Python very well ?

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Rebuild python extensions if depends have changed
  2010-11-25 19:31 ` Ian Jackson
@ 2010-11-26  5:57   ` Juergen Gross
  0 siblings, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2010-11-26  5:57 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On 11/25/10 20:31, Ian Jackson wrote:
> Juergen Gross writes ("[Xen-devel] [PATCH] Rebuild python extensions if depends have changed"):
>> Adds depends information for building python extensions.
>> The extensions depend on the library binaries they are using.
>
> Can you explain what the impact of this patch is, for those of us who
> don't understand Python very well ?

Sure.
The python extensions are not built via make, but with help of a python
tool. Up to now no depends have been defined, which will lead to possible
problems: changing a xen library which is used by the python extensions does
not necessarily result in rebuilding the extensions.

My patch defines the libraries used by the extensions as dependencies.
Changing a library will result in a rebuild of the using extensions.


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Rebuild python extensions if depends have changed
  2010-11-24 14:34 [PATCH] Rebuild python extensions if depends have changed Juergen Gross
  2010-11-25 19:31 ` Ian Jackson
@ 2010-12-10 18:13 ` Ian Jackson
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2010-12-10 18:13 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel

Juergen Gross writes ("[Xen-devel] [PATCH] Rebuild python extensions if depends have changed"):
> Adds depends information for building python extensions.
> The extensions depend on the library binaries they are using.

Applied, thanks.

Ian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-10 18:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 14:34 [PATCH] Rebuild python extensions if depends have changed Juergen Gross
2010-11-25 19:31 ` Ian Jackson
2010-11-26  5:57   ` Juergen Gross
2010-12-10 18:13 ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.