Title: [124183] trunk/Tools
- Revision
- 124183
- Author
- [email protected]
- Date
- 2012-07-31 01:53:05 -0700 (Tue, 31 Jul 2012)
Log Message
[jhbuild] Also try to load jhbuild Python module from the source checkout
Reviewed by Philippe Normand.
JHBuild also seems to have an installation mode where it prefers to load its
Python modules from the source checkout. This seems to be used particularly
on the GTK+ 64-bit release bot. We should fall back to this mode.
* jhbuild/jhbuildutils.py:
(enter_jhbuild_environment_if_available): Use the source checkout if there
is no installation path.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (124182 => 124183)
--- trunk/Tools/ChangeLog 2012-07-31 08:46:59 UTC (rev 124182)
+++ trunk/Tools/ChangeLog 2012-07-31 08:53:05 UTC (rev 124183)
@@ -1,3 +1,17 @@
+2012-07-31 Martin Robinson <[email protected]>
+
+ [jhbuild] Also try to load jhbuild Python module from the source checkout
+
+ Reviewed by Philippe Normand.
+
+ JHBuild also seems to have an installation mode where it prefers to load its
+ Python modules from the source checkout. This seems to be used particularly
+ on the GTK+ 64-bit release bot. We should fall back to this mode.
+
+ * jhbuild/jhbuildutils.py:
+ (enter_jhbuild_environment_if_available): Use the source checkout if there
+ is no installation path.
+
2012-07-30 Ryosuke Niwa <[email protected]>
Revert r124153 and land the "right" build fix per ap's comment on the bug 92676.
Modified: trunk/Tools/jhbuild/jhbuildutils.py (124182 => 124183)
--- trunk/Tools/jhbuild/jhbuildutils.py 2012-07-31 08:46:59 UTC (rev 124182)
+++ trunk/Tools/jhbuild/jhbuildutils.py 2012-07-31 08:53:05 UTC (rev 124183)
@@ -27,18 +27,20 @@
if not os.path.exists(get_dependencies_path()):
return False
+ # Sometimes jhbuild chooses to install in a way that reads the library from the source directory, so fall
+ # back to that method.
+ source_path = os.path.join(get_dependencies_path(), "Source", "jhbuild")
+ sys.path.insert(0, source_path)
+
# We don't know the Python version, so we just assume that we can safely take the first one in the list.
site_packages_path = glob.glob(os.path.join(get_dependencies_path(), "Root", "lib", "*", "site-packages"))
- if not len(site_packages_path):
- return False
+ if len(site_packages_path):
+ site_packages_path = site_packages_path[0]
+ sys.path.insert(0, site_packages_path)
- site_packages_path = site_packages_path[0]
- sys.path.insert(0, site_packages_path)
-
- import jhbuild.config
- from jhbuild.errors import FatalError
-
try:
+ import jhbuild.config
+ from jhbuild.errors import FatalError
config = jhbuild.config.Config(get_config_file_for_platform(platform))
except FatalError, exception:
sys.stderr.write('Could not load jhbuild config file: %s\n' % exception.args[0])
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes