Skip to content

Commit

Permalink
[webkitcorepy] Packaging requires pyparsing (Follow-up to 268523@main)
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=262124
rdar://116062896

Reviewed by Elliott Williams.

Landed incorrect version of this change in 268523@main (5bae443),
land the correctly reviewed version.

* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Install base libraries from a list instead naming them explicitly.
(AutoInstall): Centralize all libraries required by setup.py in a single list,
add pyparsing to that list.

Canonical link: https://commits.webkit.org/268542@main
  • Loading branch information
JonWBedard committed Sep 27, 2023
1 parent f6ffab2 commit 7d79fbb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,10 @@ def install(self):
if self.is_cached():
return

# Make sure that setuptools, tomli, setuptools_scm, wheel and packaging are installed, since setup.py relies on them
if self.name not in ['setuptools', 'wheel', 'pyparsing', 'packaging', 'tomli', 'setuptools_scm']:
AutoInstall.install('setuptools')
AutoInstall.install('wheel')
AutoInstall.install('pyparsing')
AutoInstall.install('packaging')
if sys.version_info >= (3, 0):
AutoInstall.install('tomli')
AutoInstall.install('setuptools_scm')
# Make sure that base libraries are installed, since setup.py relies on them
if self.name not in AutoInstall.BASE_LIBRARIES:
for library in AutoInstall.BASE_LIBRARIES:
AutoInstall.install(library)

# In some cases a package may check if another package is installed without actually
# importing it, which would make the AutoInstall to miss the dependency as it would
Expand Down Expand Up @@ -434,6 +429,11 @@ class AutoInstall(object):
DISABLE_ENV_VAR = 'DISABLE_WEBKITCOREPY_AUTOINSTALLER'
CA_CERT_PATH_ENV_VAR = 'AUTOINSTALL_CA_CERT_PATH'

# This list of libraries is required to install other libraries, and must be installed first
BASE_LIBRARIES = ['setuptools', 'wheel', 'pyparsing', 'packaging', 'setuptools_scm']
if sys.version_info >= (3, 0):
BASE_LIBRARIES.insert(-1, 'tomli')

directory = None
index = _default_pypi_index()
timeout = 30
Expand Down

0 comments on commit 7d79fbb

Please sign in to comment.