[PATCH 3/3] Improve run-spoke and related files so we can use overrides directly from anaconda sources for testing

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

 



---
 Makefile.am                          |    4 ++--
 pyanaconda/ui/gui/tools/run-spoke.py |   12 +++++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 59b5d0b..bedba06 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,7 +105,7 @@ unittests-logpicker:
 
 # GUI TESTING
 runspoke:
-	ANACONDA_DATA=${PWD}/data ANACONDA_WIDGETS_DATA=${PWD}/widgets/data ANACONDA_INSTALL_CLASSES=${PWD}/pyanaconda/installclasses PYTHONPATH=.:pyanaconda/isys/.libs:widgets/python/:widgets/src/.libs/ LD_LIBRARY_PATH=widgets/src/.libs  UIPATH=pyanaconda/ui/gui/   GI_TYPELIB_PATH=widgets/src/ pyanaconda/ui/gui/tools/run-spoke.py ${SPOKE_MODULE} ${SPOKE_CLASS}
+	ANACONDA_DATA=${PWD}/data ANACONDA_WIDGETS_OVERRIDES=${PWD}/widgets/python ANACONDA_WIDGETS_DATA=${PWD}/widgets/data ANACONDA_INSTALL_CLASSES=${PWD}/pyanaconda/installclasses PYTHONPATH=.:pyanaconda/isys/.libs:widgets/python/:widgets/src/.libs/ LD_LIBRARY_PATH=widgets/src/.libs  UIPATH=pyanaconda/ui/gui/   GI_TYPELIB_PATH=widgets/src/ pyanaconda/ui/gui/tools/run-spoke.py ${SPOKE_MODULE} ${SPOKE_CLASS}
 
 runhub:
-	ANACONDA_DATA=${PWD}/data ANACONDA_WIDGETS_DATA=${PWD}/widgets/data ANACONDA_INSTALL_CLASSES=${PWD}/pyanaconda/installclasses PYTHONPATH=.:pyanaconda/isys/.libs:widgets/python/:widgets/src/.libs/ LD_LIBRARY_PATH=widgets/src/.libs  UIPATH=pyanaconda/ui/gui/   GI_TYPELIB_PATH=widgets/src/ pyanaconda/ui/gui/tools/run-hub.py ${HUB_MODULE} ${HUB_CLASS}
+	ANACONDA_DATA=${PWD}/data ANACONDA_WIDGETS_OVERRIDES=${PWD}/widgets/python ANACONDA_WIDGETS_DATA=${PWD}/widgets/data ANACONDA_INSTALL_CLASSES=${PWD}/pyanaconda/installclasses PYTHONPATH=.:pyanaconda/isys/.libs:widgets/python/:widgets/src/.libs/ LD_LIBRARY_PATH=widgets/src/.libs  UIPATH=pyanaconda/ui/gui/   GI_TYPELIB_PATH=widgets/src/ pyanaconda/ui/gui/tools/run-hub.py ${HUB_MODULE} ${HUB_CLASS}
diff --git a/pyanaconda/ui/gui/tools/run-spoke.py b/pyanaconda/ui/gui/tools/run-spoke.py
index 8acd4de..d00de0d 100755
--- a/pyanaconda/ui/gui/tools/run-spoke.py
+++ b/pyanaconda/ui/gui/tools/run-spoke.py
@@ -1,7 +1,17 @@
 #!/usr/bin/python
 
+import sys, os
+
+import gi.overrides
+
+# We need this so we can tell GI to look for overrides objects
+# also in anaconda source directories
+for p in os.environ.get("ANACONDA_WIDGETS_OVERRIDES", "").split(":"):
+    gi.overrides.__path__.append(p)
+
 from gi.repository import AnacondaWidgets, Gtk
-import ctypes, sys
+
+import ctypes
 import os.path
 
 # Check command line arguments
-- 
1.7.10.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux