- Revision
- 265607
- Author
- [email protected]
- Date
- 2020-08-13 08:42:38 -0700 (Thu, 13 Aug 2020)
Log Message
[webkitpy] Use webkitcorepy's auto installer for coverage
https://bugs.webkit.org/show_bug.cgi?id=215419
<rdar://problem/66922400>
Reviewed by Stephanie Lewis.
* Scripts/webkitpy/__init__.py: Add coverage and it's dependencies.
* Scripts/webkitpy/test/main.py:
(Tester._run_tests): Stop relying on webkitpy's autoinstaller.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module): Remove _install_coverage, _install_toml.
(AutoinstallImportHook._install_coverage): Deleted.
(AutoinstallImportHook._install_toml): Deleted.
* Scripts/webkitpy/thirdparty/__init___unittest.py:
(ThirdpartyTest.test_imports): Remove coverage.
* flatpak/flatpakutils.py: Stop relying on webkitpy's autoinstaller.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (265606 => 265607)
--- trunk/Tools/ChangeLog 2020-08-13 15:35:18 UTC (rev 265606)
+++ trunk/Tools/ChangeLog 2020-08-13 15:42:38 UTC (rev 265607)
@@ -1,3 +1,22 @@
+2020-08-13 Jonathan Bedard <[email protected]>
+
+ [webkitpy] Use webkitcorepy's auto installer for coverage
+ https://bugs.webkit.org/show_bug.cgi?id=215419
+ <rdar://problem/66922400>
+
+ Reviewed by Stephanie Lewis.
+
+ * Scripts/webkitpy/__init__.py: Add coverage and it's dependencies.
+ * Scripts/webkitpy/test/main.py:
+ (Tester._run_tests): Stop relying on webkitpy's autoinstaller.
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook.find_module): Remove _install_coverage, _install_toml.
+ (AutoinstallImportHook._install_coverage): Deleted.
+ (AutoinstallImportHook._install_toml): Deleted.
+ * Scripts/webkitpy/thirdparty/__init___unittest.py:
+ (ThirdpartyTest.test_imports): Remove coverage.
+ * flatpak/flatpakutils.py: Stop relying on webkitpy's autoinstaller.
+
2020-08-13 Carlos Alberto Lopez Perez <[email protected]>
[GTK][WPE] Add a script for generating MiniBrowser bundles
Modified: trunk/Tools/Scripts/webkitpy/__init__.py (265606 => 265607)
--- trunk/Tools/Scripts/webkitpy/__init__.py 2020-08-13 15:35:18 UTC (rev 265606)
+++ trunk/Tools/Scripts/webkitpy/__init__.py 2020-08-13 15:42:38 UTC (rev 265607)
@@ -24,5 +24,8 @@
if (is_root or not does_own_libraries):
libraries = os.path.expanduser('~/Library/webkitpy')
-from webkitcorepy import AutoInstall
+from webkitcorepy import AutoInstall, Package, Version
AutoInstall.set_directory(os.path.join(libraries, 'autoinstalled', 'python-{}'.format(sys.version_info[0])))
+
+AutoInstall.register(Package('coverage', Version(5, 2, 1)))
+AutoInstall.register(Package('toml', Version(0, 10, 1)))
Modified: trunk/Tools/Scripts/webkitpy/test/main.py (265606 => 265607)
--- trunk/Tools/Scripts/webkitpy/test/main.py 2020-08-13 15:35:18 UTC (rev 265606)
+++ trunk/Tools/Scripts/webkitpy/test/main.py 2020-08-13 15:42:38 UTC (rev 265607)
@@ -165,7 +165,7 @@
_log.warning("Checking code coverage, so running things serially")
self._options.child_processes = 1
- import webkitpy.thirdparty.autoinstalled.coverage as coverage
+ import coverage
cov = coverage.coverage(omit=[
"/usr/*",
"*/webkitpy/thirdparty/autoinstalled/*",
Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py (265606 => 265607)
--- trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2020-08-13 15:35:18 UTC (rev 265606)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2020-08-13 15:42:38 UTC (rev 265607)
@@ -98,8 +98,6 @@
self._install_pycodestyle()
elif '.pylint' in fullname:
self._install_pylint()
- elif '.coverage' in fullname:
- self._install_coverage()
elif '.buildbot' in fullname:
self._install_buildbot()
elif '.keyring' in fullname:
@@ -124,8 +122,6 @@
self._install_beautifulsoup()
elif '.html5lib' in fullname:
self._install_html5lib()
- elif '.toml' in fullname:
- self._install_toml()
def _install_six(self):
self._install("https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz",
@@ -248,10 +244,6 @@
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-4.5.4/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)
@@ -301,11 +293,6 @@
full_firefox_url = re.findall(r'.*%s.*' % filename_postfix, all_firefox_release_urls)[0].split('"')[3]
self.install_binary(full_firefox_url, 'geckodriver')
- def _install_toml(self):
- toml_dir = self._fs.join(_AUTOINSTALLED_DIR, "toml")
- installer = AutoInstaller(prepend_to_search_path=True, target_dir=toml_dir)
- installer.install(url="" url_subpath="toml-0.10.0/toml")
-
def _install(self, url, url_subpath=None, target_name=None):
installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR)
return installer.install(url="" url_subpath=url_subpath, target_name=target_name)
Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py (265606 => 265607)
--- trunk/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py 2020-08-13 15:35:18 UTC (rev 265606)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py 2020-08-13 15:42:38 UTC (rev 265607)
@@ -37,6 +37,5 @@
# This method tests that we can actually import everything.
# unused-variable, import failures - pylint: disable-msg=W0612,E0611,F0401
import webkitpy.thirdparty.autoinstalled.buildbot
- import webkitpy.thirdparty.autoinstalled.coverage
import webkitpy.thirdparty.autoinstalled.mechanize
import webkitpy.thirdparty.autoinstalled.pylint
Modified: trunk/Tools/flatpak/flatpakutils.py (265606 => 265607)
--- trunk/Tools/flatpak/flatpakutils.py 2020-08-13 15:35:18 UTC (rev 265606)
+++ trunk/Tools/flatpak/flatpakutils.py 2020-08-13 15:42:38 UTC (rev 265607)
@@ -35,7 +35,6 @@
import re
from webkitpy.common.system.logutils import configure_logging
-import webkitpy.thirdparty.autoinstalled.toml
import toml
try: