⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268844 in webkit


Ignore:
Timestamp:
Oct 21, 2020, 4:26:08 PM (6 years ago)
Author:
Jonathan Bedard
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.

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r268827 r268844  
     12020-10-21  Jonathan Bedard  <jbedard@apple.com>
     2
     3        [webkitpy] Use webkitcorepy's autoinstaller for beautifulsoup
     4        https://bugs.webkit.org/show_bug.cgi?id=218049
     5        <rdar://problem/70542684>
     6
     7        Reviewed by Aakash Jain.
     8
     9        * Scripts/webkitpy/__init__.py:
     10        * Scripts/webkitpy/thirdparty/BeautifulSoup.py:
     11        * Scripts/webkitpy/thirdparty/__init__.py:
     12        (AutoinstallImportHook.find_module): Remove _install_beatifulsoup.
     13        (AutoinstallImportHook._install_pytest_timeout): Deleted.
     14        (AutoinstallImportHook._install_pytest): Deleted.
     15        (AutoinstallImportHook._install_beautifulsoup): Deleted.
     16
    1172020-10-21  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    218
  • trunk/Tools/Scripts/webkitpy/__init__.py

    r268673 r268844  
    3333AutoInstall.register(Package('atomicwrites', Version(1, 4, 0)))
    3434AutoInstall.register(Package('attr', Version(19, 1, 0), pypi_name='attrs'))
     35AutoInstall.register(Package('bs4', Version(4, 9, 3), pypi_name='beautifulsoup4'))
    3536AutoInstall.register(Package('configparser', Version(4, 0, 2)))
    3637AutoInstall.register(Package('contextlib2', Version(0, 6, 0)))
     
    5758AutoInstall.register(Package('pylint', Version(0, 25, 2)))
    5859AutoInstall.register(Package('scandir', Version(1, 10, 0)))
     60AutoInstall.register(Package('soupsieve', Version(1, 9, 6)))
    5961AutoInstall.register(Package('selenium', Version(3, 141, 0)))
    6062AutoInstall.register(Package('toml', Version(0, 10, 1)))
  • trunk/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py

    r267805 r268844  
    2525if sys.version_info > (3, 0):
    2626    import html5lib
    27     import webkitpy.thirdparty.autoinstalled.bs4 as bs4
    28     from webkitpy.thirdparty.autoinstalled.bs4.builder import builder_registry, TreeBuilder
    29     from webkitpy.thirdparty.autoinstalled.bs4.builder._htmlparser import HTMLParserTreeBuilder
     27    import bs4
     28    from bs4.builder import builder_registry, TreeBuilder
     29    from bs4.builder._htmlparser import HTMLParserTreeBuilder
    3030
    3131    class BeautifulSoup(bs4.BeautifulSoup):
  • trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py

    r268673 r268844  
    102102        elif '.geckodriver' in fullname:
    103103            self.install_geckodriver()
    104         elif '.bs4' in fullname:
    105             self._install_beautifulsoup()
    106 
    107     def _install_pytest_timeout(self):
    108         self._install("https://files.pythonhosted.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz",
    109                               "pytest-timeout-1.2.0/pytest_timeout.py")
    110 
    111     def _install_pytest(self):
    112         self._ensure_autoinstalled_dir_is_in_sys_path()
    113         self._install("https://files.pythonhosted.org/packages/90/e3/e075127d39d35f09a500ebb4a90afd10f9ef0a1d28a6d09abeec0e444fdd/py-1.5.2.tar.gz",
    114                               "py-1.5.2/py")
    115         self._install("https://files.pythonhosted.org/packages/11/bf/cbeb8cdfaffa9f2ea154a30ae31a9d04a1209312e2919138b4171a1f8199/pluggy-0.6.0.tar.gz",
    116                               "pluggy-0.6.0/pluggy")
    117         self._install("https://files.pythonhosted.org/packages/c0/2f/6773347277d76c5ade4414a6c3f785ef27e7f5c4b0870ec7e888e66a8d83/more-itertools-4.2.0.tar.gz",
    118                               "more-itertools-4.2.0/more_itertools")
    119 
    120         self._install("https://files.pythonhosted.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz",
    121                               "atomicwrites-1.1.5/atomicwrites")
    122         self._install("https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz",
    123                               "funcsigs-1.0.2/funcsigs")
    124         self._install("https://files.pythonhosted.org/packages/e4/ac/a04671e118b57bee87dabca1e0f2d3bda816b7a551036012d0ca24190e71/attrs-18.1.0.tar.gz",
    125                               "attrs-18.1.0/src/attr")
    126         self._install("https://files.pythonhosted.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz",
    127                               "pytest-3.6.2/src/_pytest")
    128         self._install("https://files.pythonhosted.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz",
    129                               "pytest-3.6.2/src/pytest.py")
    130 
    131     def _install_beautifulsoup(self):
    132         if sys.version_info < (3, 0):
    133             return
    134 
    135         self._ensure_autoinstalled_dir_is_in_sys_path()
    136         self._install("https://files.pythonhosted.org/packages/7f/4e/95a13527e18b6f1a15c93f1c634b86d5fa634c5619dce695f4e0cd68182f/soupsieve-1.9.4.tar.gz",
    137                       "soupsieve-1.9.4/soupsieve")
    138         did_download_bs4 = self._install("https://files.pythonhosted.org/packages/86/cd/495c68f0536dcd25f016e006731ba7be72e072280305ec52590012c1e6f2/beautifulsoup4-4.8.1.tar.gz",
    139                                          "beautifulsoup4-4.8.1/bs4")
    140         if did_download_bs4:
    141             from multiprocessing import Process
    142             from lib2to3.main import main
    143 
    144             try:
    145                 sys.stdout = open(os.devnull, 'w')
    146                 process = Process(target=main, args=('lib2to3.fixes', ['-w', self._fs.join(_AUTOINSTALLED_DIR, 'bs4')]))
    147                 process.start()
    148                 process.join()
    149             finally:
    150                 sys.stdout = sys.__stdout__
    151104
    152105    # autoinstalled.buildbot is used by BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py
Note: See TracChangeset for help on using the changeset viewer.