Title: [268844] trunk/Tools
Revision
268844
Author
[email protected]
Date
2020-10-21 16:26:08 -0700 (Wed, 21 Oct 2020)

Log Message

[webkitpy] Use webkitcorepy's autoinstaller for beautifulsoup
https://bugs.webkit.org/show_bug.cgi?id=218049
<rdar://problem/70542684>

Reviewed by Aakash Jain.

* Scripts/webkitpy/__init__.py:
* Scripts/webkitpy/thirdparty/BeautifulSoup.py:
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module): Remove _install_beatifulsoup.
(AutoinstallImportHook._install_pytest_timeout): Deleted.
(AutoinstallImportHook._install_pytest): Deleted.
(AutoinstallImportHook._install_beautifulsoup): Deleted.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (268843 => 268844)


--- trunk/Tools/ChangeLog	2020-10-21 23:09:27 UTC (rev 268843)
+++ trunk/Tools/ChangeLog	2020-10-21 23:26:08 UTC (rev 268844)
@@ -1,3 +1,19 @@
+2020-10-21  Jonathan Bedard  <[email protected]>
+
+        [webkitpy] Use webkitcorepy's autoinstaller for beautifulsoup
+        https://bugs.webkit.org/show_bug.cgi?id=218049
+        <rdar://problem/70542684>
+
+        Reviewed by Aakash Jain.
+
+        * Scripts/webkitpy/__init__.py:
+        * Scripts/webkitpy/thirdparty/BeautifulSoup.py:
+        * Scripts/webkitpy/thirdparty/__init__.py:
+        (AutoinstallImportHook.find_module): Remove _install_beatifulsoup.
+        (AutoinstallImportHook._install_pytest_timeout): Deleted.
+        (AutoinstallImportHook._install_pytest): Deleted.
+        (AutoinstallImportHook._install_beautifulsoup): Deleted.
+
 2020-10-21  Carlos Alberto Lopez Perez  <[email protected]>
 
         update-webkitgtk-libs and run-webkit-tests fail silently if flatpak has problems updating

Modified: trunk/Tools/Scripts/webkitpy/__init__.py (268843 => 268844)


--- trunk/Tools/Scripts/webkitpy/__init__.py	2020-10-21 23:09:27 UTC (rev 268843)
+++ trunk/Tools/Scripts/webkitpy/__init__.py	2020-10-21 23:26:08 UTC (rev 268844)
@@ -32,6 +32,7 @@
 
 AutoInstall.register(Package('atomicwrites', Version(1, 4, 0)))
 AutoInstall.register(Package('attr', Version(19, 1, 0), pypi_name='attrs'))
+AutoInstall.register(Package('bs4', Version(4, 9, 3), pypi_name='beautifulsoup4'))
 AutoInstall.register(Package('configparser', Version(4, 0, 2)))
 AutoInstall.register(Package('contextlib2', Version(0, 6, 0)))
 AutoInstall.register(Package('coverage', Version(5, 2, 1)))
@@ -56,6 +57,7 @@
 AutoInstall.register(Package('pycodestyle', Version(2, 5, 0)))
 AutoInstall.register(Package('pylint', Version(0, 25, 2)))
 AutoInstall.register(Package('scandir', Version(1, 10, 0)))
+AutoInstall.register(Package('soupsieve', Version(1, 9, 6)))
 AutoInstall.register(Package('selenium', Version(3, 141, 0)))
 AutoInstall.register(Package('toml', Version(0, 10, 1)))
 AutoInstall.register(Package('wcwidth', Version(0, 2, 5)))

Modified: trunk/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py (268843 => 268844)


--- trunk/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py	2020-10-21 23:09:27 UTC (rev 268843)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py	2020-10-21 23:26:08 UTC (rev 268844)
@@ -24,9 +24,9 @@
 
 if sys.version_info > (3, 0):
     import html5lib
-    import webkitpy.thirdparty.autoinstalled.bs4 as bs4
-    from webkitpy.thirdparty.autoinstalled.bs4.builder import builder_registry, TreeBuilder
-    from webkitpy.thirdparty.autoinstalled.bs4.builder._htmlparser import HTMLParserTreeBuilder
+    import bs4
+    from bs4.builder import builder_registry, TreeBuilder
+    from bs4.builder._htmlparser import HTMLParserTreeBuilder
 
     class BeautifulSoup(bs4.BeautifulSoup):
         HTML_ENTITIES = 'html'

Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py (268843 => 268844)


--- trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py	2020-10-21 23:09:27 UTC (rev 268843)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py	2020-10-21 23:26:08 UTC (rev 268844)
@@ -101,54 +101,7 @@
             self.install_chromedriver()
         elif '.geckodriver' in fullname:
             self.install_geckodriver()
-        elif '.bs4' in fullname:
-            self._install_beautifulsoup()
 
-    def _install_pytest_timeout(self):
-        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._ensure_autoinstalled_dir_is_in_sys_path()
-        self._install("https://files.pythonhosted.org/packages/90/e3/e075127d39d35f09a500ebb4a90afd10f9ef0a1d28a6d09abeec0e444fdd/py-1.5.2.tar.gz",
-                              "py-1.5.2/py")
-        self._install("https://files.pythonhosted.org/packages/11/bf/cbeb8cdfaffa9f2ea154a30ae31a9d04a1209312e2919138b4171a1f8199/pluggy-0.6.0.tar.gz",
-                              "pluggy-0.6.0/pluggy")
-        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://files.pythonhosted.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz",
-                              "atomicwrites-1.1.5/atomicwrites")
-        self._install("https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz",
-                              "funcsigs-1.0.2/funcsigs")
-        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://files.pythonhosted.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz",
-                              "pytest-3.6.2/src/_pytest")
-        self._install("https://files.pythonhosted.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz",
-                              "pytest-3.6.2/src/pytest.py")
-
-    def _install_beautifulsoup(self):
-        if sys.version_info < (3, 0):
-            return
-
-        self._ensure_autoinstalled_dir_is_in_sys_path()
-        self._install("https://files.pythonhosted.org/packages/7f/4e/95a13527e18b6f1a15c93f1c634b86d5fa634c5619dce695f4e0cd68182f/soupsieve-1.9.4.tar.gz",
-                      "soupsieve-1.9.4/soupsieve")
-        did_download_bs4 = self._install("https://files.pythonhosted.org/packages/86/cd/495c68f0536dcd25f016e006731ba7be72e072280305ec52590012c1e6f2/beautifulsoup4-4.8.1.tar.gz",
-                                         "beautifulsoup4-4.8.1/bs4")
-        if did_download_bs4:
-            from multiprocessing import Process
-            from lib2to3.main import main
-
-            try:
-                sys.stdout = open(os.devnull, 'w')
-                process = Process(target=main, args=('lib2to3.fixes', ['-w', self._fs.join(_AUTOINSTALLED_DIR, 'bs4')]))
-                process.start()
-                process.join()
-            finally:
-                sys.stdout = sys.__stdout__
-
     # 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.
     def _install_buildbot(self):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to