Skip to content

Commit

Permalink
[autoinstall] Recognize wheels which are purely precompiled shared li…
Browse files Browse the repository at this point in the history
…braries

https://bugs.webkit.org/show_bug.cgi?id=264755
rdar://118344315

Reviewed by Jonathan Bedard.

Some projects, like https://pypi.org/project/jq/, distribute wheels that
are currently unrecognized because they don't contain a file whose name
exactly matches the project name. (In jq's case, it has a
"jq.cpython-39-darwin.so" but not a "jq" in the wheel.)

Per PEP-491, wheels don't have to have files whose names match the
package name, so our check is overzealous. Remove it.

* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install):

Canonical link: https://commits.webkit.org/270666@main
  • Loading branch information
emw-apple committed Nov 13, 2023
1 parent 0acf00b commit 0472cd1
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,8 @@ def install(self):
else:
# We might not need setup.py at all, check if we have dist-info and the library in the temporary location
to_be_moved = os.listdir(temp_location)
has_module_or_package = self.name in to_be_moved or '{}.py'.format(self.name) in to_be_moved
if (
archive.extension != 'whl'
or not has_module_or_package
or not any(
element.endswith('.dist-info') for element in to_be_moved
)
Expand Down

0 comments on commit 0472cd1

Please sign in to comment.