[winswitch] [PATCH] Implement --without-x264 and --without-vpx

Timo Juhani Lindfors timo.lindfors at iki.fi
Thu Apr 12 13:04:43 BST 2012


---
 src/setup.py |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/setup.py b/src/setup.py
index 5e09760..d1ab802 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -205,13 +205,23 @@ if XPRA_LOCAL_SERVERS_SUPPORTED:
                 **pkgconfig("x11")
                 ))
 x264_ENABLED = True
+vpx_ENABLED = True
+ignored_args = []
+for arg in sys.argv:
+    if arg == "--without-x264":
+        x264_ENABLED = False
+    elif arg == "--without-vpx":
+        vpx_ENABLED = False
+    else:
+        ignored_args.append(arg)
+sys.argv = ignored_args
+
 if x264_ENABLED:
     packages.append("xpra.x264")
     cython_add(Extension("xpra.x264.codec",
                 ["xpra/x264/codec.pyx", "xpra/x264/x264lib.c"],
                 **pkgconfig("x264", "libswscale", "libavcodec")
                 ))
-vpx_ENABLED = True
 if vpx_ENABLED:
     packages.append("xpra.vpx")
     cython_add(Extension("xpra.vpx.codec",
@@ -224,7 +234,6 @@ if vpx_ENABLED:
 
 
 
-
 setup(
     name="parti-all",
     author="Antoine Martin",
-- 
1.7.2.5




More information about the shifter-users mailing list