瀏覽代碼

[core] Add warning and propose workaround for Ubuntu 14.04 build error

Romain Rigaux 11 年之前
父節點
當前提交
ea7490f3bf
共有 2 個文件被更改,包括 17 次插入1 次删除
  1. 2 0
      apps/search/src/search/templates/admin_collections.mako
  2. 15 1
      tools/virtual-bootstrap/virtual-bootstrap.py

+ 2 - 0
apps/search/src/search/templates/admin_collections.mako

@@ -28,9 +28,11 @@ ${ commonheader(_('Search'), "search", user, "29px") | n,unicode }
 
 <div class="search-bar" style="height: 30px">
   <div class="pull-right">
+    % if 'indexer' in app:
     <a class="btn importBtn" href="${ url('indexer:collections') }">
       <i class="fa fa-database"></i> ${ _('Indexes') }
     </a>
+    % endif
   </div>
   <h4><i class="fa fa-tags"></i> ${_('Dashboards')}</h4>
 </div>

+ 15 - 1
tools/virtual-bootstrap/virtual-bootstrap.py

@@ -376,7 +376,21 @@ def file_search_dirs():
     return [d for d in dirs if os.path.isdir(d)]
 
 def install_setuptools(py_executable, unzip=False):
-    _install_req(py_executable, unzip)
+    try:
+        _install_req(py_executable, unzip)
+    except OSError, e:
+        print """
+        -----------------------------------------------------------------------------------------------------------------
+        If on Ubuntu 14.04 Trusty, you might be hitting https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1115466.
+
+        Recommended workaround:
+        sudo ln -s /usr/lib/python2.7/plat-*/_sysconfigdata_nd.py /usr/lib/python2.7/
+
+        More information:
+        http://gethue.com/how-to-build-hue-on-ubuntu-14-04-trusty/
+        -----------------------------------------------------------------------------------------------------------------
+        """
+        raise e
 
 def install_distribute(py_executable, unzip=False):
     _install_req(py_executable, unzip, distribute=True)