Bug 263825 - [webkitcorepy] Failed to install setuptools
Summary: [webkitcorepy] Failed to install setuptools
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
: 265931 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-10-28 02:48 PDT by Kdwk
Modified: 2024-06-04 15:08 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kdwk 2023-10-28 02:48:40 PDT
After building WebKit successfully with Tools/Scripts/build-webkit --gtk --release --cmakeargs="..." --makeargs="..."

⬢[kdwk@toolbox WebKit]$ Tools/Scripts/run-minibrowser --gtk --release
Downloading setuptools-56.0.0...
Failed to install setuptools-56.0.0!

Error raised: Destination path '/app/webkit/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/distutils-precedence.pth' already exists
Traceback (most recent call last):
  File "/app/webkit/Tools/Scripts/webkitpy/minibrowser/run_webkit_app.py", line 64, in main
    port = factory.PortFactory(Host()).get(options.platform, options=options)
  File "/app/webkit/Tools/Scripts/webkitpy/port/factory.py", line 142, in get
    module = __import__('webkitpy.port.{}'.format(module_name), globals(), locals(), [], 0)
  File "/app/webkit/Tools/Scripts/webkitpy/port/ios_simulator.py", line 29, in <module>
    from webkitpy.port.ios import IOSPort
  File "/app/webkit/Tools/Scripts/webkitpy/port/ios.py", line 29, in <module>
    from webkitpy.port.device_port import DevicePort
  File "/app/webkit/Tools/Scripts/webkitpy/port/device_port.py", line 30, in <module>
    from webkitpy.results.upload import Upload
  File "/app/webkit/Tools/Scripts/webkitpy/results/upload.py", line 28, in <module>
    import requests
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1002, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 945, in _find_spec
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 692, in find_spec
    loader = cls.find_module(fullname, path=path)
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 706, in find_module
    cls.install(name)
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 679, in install
    return all([to_install.install() for to_install in packages])
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 679, in <listcomp>
    return all([to_install.install() for to_install in packages])
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 303, in install
    AutoInstall.install(library)
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 679, in install
    return all([to_install.install() for to_install in packages])
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 679, in <listcomp>
    return all([to_install.install() for to_install in packages])
  File "/app/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py", line 419, in install
    shutil.move(os.path.join(temp_location, directory), AutoInstall.directory)
  File "/usr/lib/python3.10/shutil.py", line 814, in move
    raise Error("Destination path '%s' already exists" % real_dst)
shutil.Error: Destination path '/app/webkit/Tools/Scripts/libraries/autoinstalled/python-3-x86_64/distutils-precedence.pth' already exists
Comment 1 Michael Catanzaro 2023-10-28 04:26:51 PDT
Delete /app/webkit/Tools/Scripts/libraries/autoinstalled/ and try again, does that work?
Comment 2 Kdwk 2023-10-28 04:33:34 PDT
Does not work. Same error.
Comment 3 Radar WebKit Bug Importer 2023-11-04 02:49:13 PDT
<rdar://problem/117940593>
Comment 4 Fujii Hironori 2023-12-05 23:16:54 PST
distutils-precedence.pth is causing another problem in bug#261113 comment#3.
Comment 5 Michael Catanzaro 2023-12-06 05:47:42 PST
*** Bug 265931 has been marked as a duplicate of this bug. ***
Comment 6 Jonathan Bedard 2024-04-02 13:49:37 PDT
I can't reproduce this issue, but I'm taking a stab at fixing it based on this stack-trace. If Kdwk can reproduce, I would appreciate validation that my fix works. I believe this issue would happen on essentially any of our Python scripts, `Tools/Scripts/git-webkit --help`, for example, probably reproduces this issue on Kdwk's machine.
Comment 7 Jonathan Bedard 2024-04-02 14:27:43 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26750
Comment 8 EWS 2024-06-04 11:50:26 PDT
Committed 279706@main (5ab9e6cd5bad): <https://commits.webkit.org/279706@main>

Reviewed commits have been landed. Closing PR #26750 and removing active labels.
Comment 9 EWS 2024-06-04 15:08:05 PDT
Committed 272448.1064@safari-7618-branch (6b1765ea97c5): <https://commits.webkit.org/272448.1064@safari-7618-branch>

Reviewed commits have been landed. Closing PR #1323 and removing active labels.