Skip to content

Commit 082fbf9

Browse files
committed
Define an accurate set of aliases for each autoinstalled package
https://bugs.webkit.org/show_bug.cgi?id=290598 Reviewed by Jonathan Bedard. * Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: * Tools/Scripts/webkitpy/__init__.py: * Tools/Scripts/webkitpy/autoinstalled/buildbot.py: Canonical link: https://commits.webkit.org/292966@main
1 parent b961b17 commit 082fbf9

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
from webkitcorepy.autoinstall import Package, AutoInstall
5858

5959
if sys.version_info >= (3, 12):
60-
AutoInstall.register(Package('setuptools', Version(68, 1, 2)))
60+
AutoInstall.register(Package('setuptools', Version(68, 1, 2), aliases=['_distutils_hack', 'pkg_resources']))
6161
else:
62-
AutoInstall.register(Package('setuptools', Version(59, 8, 0)))
62+
AutoInstall.register(Package('setuptools', Version(59, 8, 0), aliases=['_distutils_hack', 'pkg_resources']))
6363

6464
AutoInstall.register(Package('certifi', Version(2022, 12, 7)))
6565
AutoInstall.register(Package('chardet', Version(3, 0, 4)))
@@ -72,12 +72,12 @@
7272
AutoInstall.register(Package('requests', Version(2, 26, 0)))
7373
AutoInstall.register(Package('tomli', Version(2, 0, 1), wheel=True))
7474
AutoInstall.register(Package('setuptools_scm', Version(6, 4, 2), pypi_name='setuptools-scm', implicit_deps=['tomli']))
75-
AutoInstall.register(Package('socks', Version(1, 7, 1), pypi_name='PySocks'))
75+
AutoInstall.register(Package('socks', Version(1, 7, 1), pypi_name='PySocks', aliases=['sockshandler']))
7676
AutoInstall.register(Package('six', Version(1, 16, 0)))
7777
AutoInstall.register(Package('tblib', Version(1, 7, 0)))
7878
AutoInstall.register(Package('urllib3', Version(1, 26, 17)))
7979
AutoInstall.register(Package('wheel', Version(0, 35, 1)))
80-
AutoInstall.register(Package('cffi', Version(1, 17, 1)))
80+
AutoInstall.register(Package('cffi', Version(1, 17, 1), aliases=['_cffi_backend']))
8181
AutoInstall.register(Package('OpenSSL', Version(23, 2, 0), pypi_name='pyOpenSSL'))
8282

8383
# There are no prebuilt binaries for arm-32 of 'cryptography' and building it requires cargo/rust

Tools/Scripts/webkitpy/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
AutoInstall.register(
6060
Package("pytest", Version(7, 2, 0),
6161
implicit_deps=["attr", "pluggy", "iniconfig"]
62-
+ (["exceptiongroup"] if sys.version_info < (3, 11) else [])
62+
+ (["exceptiongroup"] if sys.version_info < (3, 11) else []),
63+
aliases=["_pytest"] # Technically also a stub "py" module, but this conflicts with the py project.
6364
)
6465
)
6566
AutoInstall.register(Package('pytest_asyncio', Version(0, 18, 3), pypi_name='pytest-asyncio', implicit_deps=['pytest'], wheel=True))
@@ -72,9 +73,9 @@
7273
AutoInstall.register(Package('importlib_metadata', Version(4, 8, 1)))
7374
AutoInstall.register(Package('typing_extensions', Version(4, 12, 2), wheel=True))
7475
AutoInstall.register(Package('atomicwrites', Version(1, 1, 5)))
75-
AutoInstall.register(Package('attr', Version(21, 3, 0), pypi_name='attrs'))
76+
AutoInstall.register(Package('attrs', Version(21, 3, 0), aliases=['attr']))
7677
AutoInstall.register(Package('bs4', Version(4, 12, 0), pypi_name='beautifulsoup4'))
77-
AutoInstall.register(Package('configparser', Version(4, 0, 2), implicit_deps=['pyparsing']))
78+
AutoInstall.register(Package('configparser', Version(4, 0, 2), implicit_deps=['pyparsing'], aliases=['backports.configparser']))
7879
AutoInstall.register(Package('contextlib2', Version(0, 6, 0)))
7980
AutoInstall.register(Package('coverage', Version(7, 6, 1), wheel=True))
8081
AutoInstall.register(Package('funcsigs', Version(1, 0, 2)))
@@ -86,7 +87,6 @@
8687
AutoInstall.register(Package('mozlog', Version(7, 1, 0), wheel=True))
8788
AutoInstall.register(Package('mozterm', Version(1, 0, 0)))
8889
AutoInstall.register(Package('pluggy', Version(0, 13, 1)))
89-
AutoInstall.register(Package('py', Version(1, 11, 0)))
9090
AutoInstall.register(Package('pycodestyle', Version(2, 5, 0)))
9191
AutoInstall.register(Package('pyfakefs', Version(5, 7, 3)))
9292
AutoInstall.register(Package('soupsieve', Version(2, 2, 1)))

Tools/Scripts/webkitpy/autoinstalled/buildbot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
AutoInstall.install('markupsafe')
3333
AutoInstall.install('jinja2')
3434

35-
AutoInstall.install(Package('attr', Version(21, 3, 0), pypi_name='attrs'))
35+
AutoInstall.install(Package('attrs', Version(21, 3), aliases=['attr']))
3636
AutoInstall.install(Package('constantly', Version(15, 1, 0)))
37-
AutoInstall.install(Package('dateutil', Version(2, 8, 1), pypi_name='python-dateutil'))
38-
AutoInstall.install(Package('future', Version(0, 18, 2)))
37+
AutoInstall.install(Package('dateutil', Version(2, 8, 1), pypi_name='python-dateutil', wheel=True))
38+
AutoInstall.install(Package('future', Version(0, 18, 2), aliases=['libfuturize', 'libpasteurize', 'past']))
3939
AutoInstall.install(Package('pbr', Version(5, 9, 0)))
4040
AutoInstall.install(Package('lz4', Version(4, 3, 2)))
4141
AutoInstall.install(Package('jwt', Version(1, 7, 1), pypi_name='PyJWT'))
@@ -46,15 +46,15 @@
4646
AutoInstall.install(Package('decorator', Version(5, 1, 1)))
4747
AutoInstall.install(Package('hamcrest', Version(2, 0, 3), pypi_name='PyHamcrest'))
4848
AutoInstall.install(Package('sqlalchemy', Version(1, 3, 20), pypi_name='SQLAlchemy'))
49-
AutoInstall.install(Package('sqlalchemy-migrate', Version(0, 13, 0)))
49+
AutoInstall.install(Package('sqlalchemy_migrate', Version(0, 13, 0), pypi_name='sqlalchemy-migrate'))
5050
AutoInstall.install(Package('sqlparse', Version(0, 4, 2)))
5151
AutoInstall.install(Package('txaio', Version(20, 4, 1)))
5252
AutoInstall.install(Package('tempita', Version(0, 5, 2), pypi_name='Tempita'))
5353

5454
# buildbot has wheel=False because we rely on items in buildbot.test that only
5555
# became public API and started being included in wheels from 3.5.0.
5656
AutoInstall.install(Package('buildbot', Version(2, 10, 5), wheel=False))
57-
AutoInstall.install(Package('buildbot-worker', Version(2, 10, 5)))
57+
AutoInstall.install(Package('buildbot_worker', Version(2, 10, 5), pypi_name='buildbot-worker'))
5858

5959

6060
sys.modules[__name__] = __import__('buildbot')

0 commit comments

Comments
 (0)