Skip to content

Commit

Permalink
[webkitcorepy] Install tomli with setuptools_scm
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261893
rdar://115851645

Reviewed by Aakash Jain.

Newer versions of setuptools_scm depend on tomli.

* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
Bump version, add tomli.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Install tomli with setuptools dependencies.

Canonical link: https://commits.webkit.org/268269@main
  • Loading branch information
JonWBedard committed Sep 21, 2023
1 parent 8c8c1cb commit 530fa2b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Tools/Scripts/libraries/webkitcorepy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def readme():

setup(
name='webkitcorepy',
version='0.16.3',
version='0.16.4',
description='Library containing various Python support classes and functions.',
long_description=readme(),
classifiers=[
Expand Down
8 changes: 6 additions & 2 deletions Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from webkitcorepy.filtered_call import filtered_call
from webkitcorepy.partial_proxy import PartialProxy

version = Version(0, 16, 3)
version = Version(0, 16, 4)

from webkitcorepy.autoinstall import Package, AutoInstall
if sys.version_info > (3, 0):
Expand Down Expand Up @@ -88,7 +88,11 @@
else:
AutoInstall.register(Package('requests', Version(2, 24)))

AutoInstall.register(Package('setuptools_scm', Version(5, 0, 2), pypi_name='setuptools-scm'))
if sys.version_info >= (3, 0):
AutoInstall.register(Package('tomli', Version(2, 0, 1), wheel=True))
AutoInstall.register(Package('setuptools_scm', Version(6, 4, 2), pypi_name='setuptools-scm', implicit_deps=['tomli']))
else:
AutoInstall.register(Package('setuptools_scm', Version(5, 0, 2), pypi_name='setuptools-scm'))
AutoInstall.register(Package('socks', Version(1, 7, 1), pypi_name='PySocks'))
AutoInstall.register(Package('six', Version(1, 15, 0)))
AutoInstall.register(Package('tblib', Version(1, 7, 0)))
Expand Down
10 changes: 6 additions & 4 deletions Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,14 @@ def install(self):
if self.is_cached():
return

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

# 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
4 changes: 2 additions & 2 deletions Tools/Scripts/webkitpy/autoinstalled/twisted.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if sys.version_info >= (3, 0):
AutoInstall.install(Package('hyperlink', Version(21, 0, 0), pypi_name='hyperlink'))
AutoInstall.install(Package('incremental', Version(21, 3, 0), pypi_name='incremental'))
AutoInstall.install(Package('twisted', Version(20, 3, 0), pypi_name='Twisted'))
AutoInstall.install(Package('twisted', Version(20, 3, 0), pypi_name='Twisted', implicit_deps=['pyparsing']))

AutoInstall.install(Package('pyOpenSSL', Version(20, 0, 0)))
# There are no prebuilt binaries for arm-32 of 'bcrypt' and building it requires cargo/rust
Expand All @@ -45,7 +45,7 @@
else:
AutoInstall.install(Package('hyperlink', Version(17, 3, 0), pypi_name='hyperlink'))
AutoInstall.install(Package('incremental', Version(17, 5, 0), pypi_name='incremental'))
AutoInstall.install(Package('twisted', Version(17, 5, 0), pypi_name='Twisted'))
AutoInstall.install(Package('twisted', Version(17, 5, 0), pypi_name='Twisted', implicit_deps=['pyparsing']))

AutoInstall.install(Package('pyOpenSSL', Version(17, 2, 0)))
AutoInstall.install(Package('pycparser', Version(2, 18)))
Expand Down

0 comments on commit 530fa2b

Please sign in to comment.