--- a/tools/python/setup.py
+++ b/tools/python/setup.py
@@ -5,6 +5,7 @@
 XEN_ROOT = "../.."
 
 extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
+extra_link_args = [ "-Wl,-rpath,${ORIGIN}/../../.." ]
 
 PATH_XEN      = XEN_ROOT + "/tools/include"
 PATH_LIBXC    = XEN_ROOT + "/tools/libxc"
@@ -13,6 +14,7 @@
 
 xc = Extension("xc",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ PATH_XEN, PATH_LIBXC, "xen/lowlevel/xc" ],
                library_dirs       = [ PATH_LIBXC ],
                libraries          = [ "xenctrl", "xenguest" ],
@@ -21,6 +23,7 @@
 
 xs = Extension("xs",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ PATH_XEN, PATH_XENSTORE, "xen/lowlevel/xs" ],
                library_dirs       = [ PATH_XENSTORE ],
                libraries          = [ "xenstore" ],
@@ -29,6 +32,7 @@
 
 scf = Extension("scf",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ "xen/lowlevel/scf" ],
                library_dirs       = [ ],
                libraries          = [ ],
@@ -37,6 +41,7 @@
 
 process = Extension("process",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ "xen/lowlevel/process" ],
                library_dirs       = [ ],
                libraries          = [ "contract" ],
@@ -45,6 +50,7 @@
 
 flask = Extension("flask",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ PATH_XEN, PATH_LIBXC, "xen/lowlevel/flask" ],
                library_dirs       = [ PATH_LIBXC ],
                libraries          = [ "xenctrl" ],
@@ -53,6 +59,7 @@
 
 ptsname = Extension("ptsname",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ "ptsname" ],
                library_dirs       = [ ],
                libraries          = [ ],
@@ -61,6 +68,7 @@
 
 checkpoint = Extension("checkpoint",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ PATH_XEN, PATH_LIBXC, PATH_XENSTORE ],
                library_dirs       = [ PATH_LIBXC, PATH_XENSTORE ],
                libraries          = [ "xenctrl", "xenguest", "xenstore", "rt" ],
@@ -72,6 +80,7 @@
 
 netlink = Extension("netlink",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ ],
                library_dirs       = [ ],
                libraries          = [ ],
@@ -81,6 +90,7 @@
 
 xl = Extension("xl",
                extra_compile_args = extra_compile_args,
+               extra_link_args    = extra_link_args,
                include_dirs       = [ PATH_XEN, PATH_LIBXL, PATH_LIBXC, "xen/lowlevel/xl" ],
                library_dirs       = [ PATH_LIBXL ],
                libraries          = [ "xenlight" ],
