Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py (239464 => 239465)
--- trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2018-12-20 21:39:11 UTC (rev 239464)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2018-12-20 21:45:12 UTC (rev 239465)
@@ -116,50 +116,48 @@
self._install_pytest()
def _install_mechanize(self):
- self._install("https://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz",
"mechanize-0.2.5/mechanize")
def _install_keyring(self):
- self._install("https://pypi.python.org/packages/7d/a9/8c6bf60710781ce13a9987c0debda8adab35eb79c6b5525f7fe5240b7a8a/keyring-7.3.1.tar.gz#md5=99dd793e1233964eb87cf56406ee66f6",
+ self._install("https://files.pythonhosted.org/packages/7d/a9/8c6bf60710781ce13a9987c0debda8adab35eb79c6b5525f7fe5240b7a8a/keyring-7.3.1.tar.gz",
"keyring-7.3.1/keyring")
def _install_pep8(self):
- self._install("https://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b",
+ self._install("https://files.pythonhosted.org/packages/source/p/pep8/pep8-0.5.0.tar.gz",
"pep8-0.5.0/pep8.py")
def _install_mozlog(self):
self._ensure_autoinstalled_dir_is_in_sys_path()
- self._install("https://pypi.python.org/packages/10/d5/d286b5dc3f40e32d2a9b3cab0b5b20a05d704958b44b4c5a9aed6472deab/mozlog-3.5.tar.gz#md5=3282c70e7037266f83d8c80119129b75",
+ self._install("https://files.pythonhosted.org/packages/10/d5/d286b5dc3f40e32d2a9b3cab0b5b20a05d704958b44b4c5a9aed6472deab/mozlog-3.5.tar.gz",
"mozlog-3.5/mozlog")
def _install_mozprocess(self):
self._ensure_autoinstalled_dir_is_in_sys_path()
- self._install("https://pypi.python.org/packages/cb/26/144dbc28d1f40e392f8a0cbee771ba624a61017f016c77ad88424d84b230/mozprocess-0.25.tar.gz#md5=07a04e6ae1a705705e4b44969fe7a182",
+ self._install("https://files.pythonhosted.org/packages/cb/26/144dbc28d1f40e392f8a0cbee771ba624a61017f016c77ad88424d84b230/mozprocess-0.25.tar.gz",
"mozprocess-0.25/mozprocess")
def _install_pytest_timeout(self):
- self._install("https://pypi.python.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz#md5=83607d91aa163562c7ee835da57d061d",
+ self._install("https://files.pythonhosted.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz",
"pytest-timeout-1.2.0/pytest_timeout.py")
def _install_pytest(self):
- self._install("https://pypi.python.org/packages/90/e3/e075127d39d35f09a500ebb4a90afd10f9ef0a1d28a6d09abeec0e444fdd/py-1.5.2.tar.gz#md5=279ca69c632069e1b71e11b14641ca28",
+ self._install("https://files.pythonhosted.org/packages/90/e3/e075127d39d35f09a500ebb4a90afd10f9ef0a1d28a6d09abeec0e444fdd/py-1.5.2.tar.gz",
"py-1.5.2/py")
- self._install("https://pypi.python.org/packages/11/bf/cbeb8cdfaffa9f2ea154a30ae31a9d04a1209312e2919138b4171a1f8199/pluggy-0.6.0.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/11/bf/cbeb8cdfaffa9f2ea154a30ae31a9d04a1209312e2919138b4171a1f8199/pluggy-0.6.0.tar.gz",
"pluggy-0.6.0/pluggy")
- self._install("https://pypi.python.org/packages/c0/2f/6773347277d76c5ade4414a6c3f785ef27e7f5c4b0870ec7e888e66a8d83/more-itertools-4.2.0.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/c0/2f/6773347277d76c5ade4414a6c3f785ef27e7f5c4b0870ec7e888e66a8d83/more-itertools-4.2.0.tar.gz",
"more-itertools-4.2.0/more_itertools")
- self._install("https://pypi.python.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz",
"six-1.11.0/six.py")
- self._install("https://pypi.python.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz",
"atomicwrites-1.1.5/atomicwrites")
- self._install("https://pypi.python.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz",
"funcsigs-1.0.2/funcsigs")
- self._install("https://pypi.python.org/packages/e4/ac/a04671e118b57bee87dabca1e0f2d3bda816b7a551036012d0ca24190e71/attrs-18.1.0.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/e4/ac/a04671e118b57bee87dabca1e0f2d3bda816b7a551036012d0ca24190e71/attrs-18.1.0.tar.gz",
"attrs-18.1.0/src/attr")
- self._install("https://pypi.python.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz",
+ self._install("https://files.pythonhosted.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz",
"pytest-3.6.2/src/_pytest")
- self._install("https://pypi.python.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz",
- "pytest-3.6.2/src/pytest.py")
def _install_pylint(self):
self._ensure_autoinstalled_dir_is_in_sys_path()
@@ -170,9 +168,9 @@
files_to_remove = []
if sys.platform == 'win32':
files_to_remove = ['test/data/write_protected_file.txt']
- installer.install("https://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove)
- installer.install("https://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz#md5=ddaf66e4d85714d9c47a46d4bed406de", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng")
- installer.install('https://pypi.python.org/packages/source/p/pylint/pylint-0.25.2.tar.gz#md5=d878d7688a4f5290dc5b53a836872400', url_subpath="pylint-0.25.2", target_name="pylint")
+ installer.install("https://files.pythonhosted.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove)
+ installer.install("https://files.pythonhosted.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng")
+ installer.install('https://files.pythonhosted.org/packages/source/p/pylint/pylint-0.25.2.tar.gz', url_subpath="pylint-0.25.2", target_name="pylint")
# autoinstalled.buildbot is used by BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py
# and should ideally match the version of BuildBot used at build.webkit.org.
@@ -184,29 +182,29 @@
# without including other modules as a side effect.
jinja_dir = self._fs.join(_AUTOINSTALLED_DIR, "jinja2")
installer = AutoInstaller(append_to_search_path=True, target_dir=jinja_dir)
- installer.install(url=""
+ installer.install(url=""
url_subpath="Jinja2-2.6/jinja2")
SQLAlchemy_dir = self._fs.join(_AUTOINSTALLED_DIR, "sqlalchemy")
installer = AutoInstaller(append_to_search_path=True, target_dir=SQLAlchemy_dir)
- installer.install(url=""
+ installer.install(url=""
url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy")
twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted")
installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir)
- installer.install(url="" url_subpath="Twisted-12.1.0/twisted")
+ installer.install(url="" url_subpath="Twisted-12.1.0/twisted")
- self._install("https://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz#md5=b6727d2810c692062c657492bcbeac6a", "buildbot-0.8.6p1/buildbot")
+ self._install("https://files.pythonhosted.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz", "buildbot-0.8.6p1/buildbot")
def _install_coverage(self):
self._ensure_autoinstalled_dir_is_in_sys_path()
- self._install(url="" url_subpath="coverage-3.5.1/coverage")
+ self._install(url="" url_subpath="coverage-3.5.1/coverage")
def _install_twisted_15_5_0(self):
twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted_15_5_0")
installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir)
- installer.install(url="" url_subpath="Twisted-15.5.0/twisted")
- installer.install(url="" url_subpath="zope.interface-4.1.3/src/zope")
+ installer.install(url="" url_subpath="Twisted-15.5.0/twisted")
+ installer.install(url="" url_subpath="zope.interface-4.1.3/src/zope")
@staticmethod
def greater_than_equal_to_version(minimum, version):
@@ -219,18 +217,21 @@
def _install_selenium(self):
self._ensure_autoinstalled_dir_is_in_sys_path()
+
+ installer = AutoInstaller(prepend_to_search_path=True, target_dir=self._fs.join(_AUTOINSTALLED_DIR, "urllib3"))
+ installer.install(url="" url_subpath="urllib3-1.24.1")
+
+ minimum_version = '3.5.0'
+ if os.path.isfile(os.path.join(_AUTOINSTALLED_DIR, 'selenium', '__init__.py')):
+ import selenium.webdriver
+ if AutoinstallImportHook.greater_than_equal_to_version(minimum_version, selenium.webdriver.__version__):
+ return
+
try:
url, url_subpath = self.get_latest_pypi_url('selenium')
except urllib2.URLError:
- minimum_version = '3.5.0'
- if os.path.isfile(os.path.join(_AUTOINSTALLED_DIR, 'selenium', '__init__.py')):
- import selenium.webdriver
- if AutoinstallImportHook.greater_than_equal_to_version(minimum_version, selenium.webdriver.__version__):
- sys.stderr.write('\nFailed to find latest selenium, falling back to existing {} version\n'.format(selenium.webdriver.__version__))
- return
-
# URL for installing the minimum required version.
- url = ''
+ url = ''
url_subpath = 'selenium-{}/selenium'.format(minimum_version)
sys.stderr.write('\nFailed to find latest selenium, falling back to minimum {} version\n'.format(minimum_version))
self._install(url="" url_subpath=url_subpath)
@@ -256,8 +257,8 @@
installer.install(url="" url_subpath=url_subpath, target_name=target_name)
def get_latest_pypi_url(self, package_name, url_subpath_format='{name}-{version}/{lname}'):
- json_url = "https://pypi.python.org/pypi/%s/json" % package_name
- response = urllib2.urlopen(json_url)
+ json_url = "https://pypi.org/pypi/%s/json" % package_name
+ response = urllib2.urlopen(json_url, timeout=30)
data = ""
url = ""
subpath = url_subpath_format.format(name=package_name, version=data['info']['version'], lname=package_name.lower())