Changeset 181088 in webkit
- Timestamp:
- Mar 5, 2015 11:32:51 AM (9 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r181076 r181088 1 2015-03-05 Csaba Osztrogonác <ossy@webkit.org> 2 3 [buildbot] mastercfg_unittest.py should be runnable easily 4 https://bugs.webkit.org/show_bug.cgi?id=142219 5 6 Reviewed by Chris Dumez. 7 8 Buildbot 0.8.6p1 runs on build.webkit org with Twisted 12.1.0, which is 9 the last Twisted version works together with this buildbot version. 10 11 * Scripts/webkitpy/common/system/autoinstall.py: 12 (AutoInstaller): Added prepend_to_search_path argument to be able 13 to prefer autoinstalled package to system package. 14 (AutoInstaller.__init__): 15 (AutoInstaller._set_up_target_dir): 16 (AutoInstaller._extract_tar): Renamed from _extract_targz, now it works with tar.bz2 too. 17 (AutoInstaller._prepare_package): 18 (AutoInstaller._extract_targz): Renamed to _extract_tar. 19 * Scripts/webkitpy/thirdparty/__init__.py: 20 (AutoinstallImportHook._install_buildbot): Autoinstall Twisted 12.1.0. 21 1 22 2015-03-05 Lukasz Bialek <l.bialek@samsung.com> 2 23 -
trunk/Tools/Scripts/webkitpy/common/system/autoinstall.py
r174448 r181088 58 58 """Supports automatically installing Python packages from an URL. 59 59 60 Supports uncompressed files, .tar.gz, and .zip formats.60 Supports uncompressed files, .tar.gz, .tar.bz2 and .zip formats. 61 61 62 62 Basic usage: … … 71 71 """ 72 72 73 def __init__(self, append_to_search_path=False, make_package=True,73 def __init__(self, append_to_search_path=False, prepend_to_search_path=False, make_package=True, 74 74 target_dir=None, temp_dir=None): 75 75 """Create an AutoInstaller instance, and set up the target directory. … … 77 77 Args: 78 78 append_to_search_path: A boolean value of whether to append the 79 target directory to the sys.path search path. 80 prepend_to_search_path: A boolean value of whether to prepend the 79 81 target directory to the sys.path search path. 80 82 make_package: A boolean value of whether to make the target … … 99 101 100 102 # Ensure that the target directory exists. 101 self._set_up_target_dir(target_dir, append_to_search_path, make_package)103 self._set_up_target_dir(target_dir, append_to_search_path, prepend_to_search_path, make_package) 102 104 103 105 self._target_dir = target_dir … … 108 110 filehandle.write(text) 109 111 110 def _set_up_target_dir(self, target_dir, append_to_search_path, 111 make_package): 112 def _set_up_target_dir(self, target_dir, append_to_search_path, prepend_to_search_path, make_package): 112 113 """Set up a target directory. 113 114 … … 115 116 target_dir: The path to the target directory to set up. 116 117 append_to_search_path: A boolean value of whether to append the 118 target directory to the sys.path search path. 119 prepend_to_search_path: A boolean value of whether to prepend the 117 120 target directory to the sys.path search path. 118 121 make_package: A boolean value of whether to make the target … … 128 131 if append_to_search_path: 129 132 sys.path.append(target_dir) 133 134 if prepend_to_search_path: 135 sys.path.insert(0, target_dir) 130 136 131 137 if make_package: … … 197 203 self._write_file(version_path, url, "utf-8") 198 204 199 def _extract_targz(self, path, scratch_dir): 200 # tarfile.extractall() extracts to a path without the trailing ".tar.gz". 201 target_basename = os.path.basename(path[:-len(".tar.gz")]) 205 def _extract_tar(self, path, scratch_dir): 206 # tarfile.extractall() extracts to a path without the trailing ".tar.gz" or ".tar.bz2". 207 208 if path.endswith(".tar.gz"): 209 tarFileSuffix = ".tar.gz" 210 elif path.endswith(".tar.bz2"): 211 tarFileSuffix = ".tar.bz2" 212 else: 213 raise Exception("...") 214 215 target_basename = os.path.basename(path[:-len(tarFileSuffix)]) 202 216 target_path = os.path.join(scratch_dir, target_basename) 203 217 … … 291 305 if path.endswith(".zip"): 292 306 new_path = self._unzip(path, scratch_dir) 293 elif path.endswith(".tar.gz") :294 new_path = self._extract_tar gz(path, scratch_dir)307 elif path.endswith(".tar.gz") or path.endswith(".tar.bz2"): 308 new_path = self._extract_tar(path, scratch_dir) 295 309 elif _CACHE_ENV_VAR in os.environ: 296 310 new_path = path -
trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py
r178589 r181088 138 138 url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy") 139 139 140 twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted") 141 installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) 142 installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5", url_subpath="Twisted-12.1.0/twisted") 143 140 144 self._install("http://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz#md5=b6727d2810c692062c657492bcbeac6a", "buildbot-0.8.6p1/buildbot") 141 145
Note: See TracChangeset
for help on using the changeset viewer.