Skip to content

Commit

Permalink
Merge pull request #1972 from freakboy3742/shallow-distinfo
Browse files Browse the repository at this point in the history
Ignore vendored .dist-info folders.
  • Loading branch information
freakboy3742 authored Aug 27, 2024
2 parents f366e9c + 438c6ff commit af1430a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/1970.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Packages that include ``.dist-info`` content in vendored dependencies are now ignored as part of the binary widening process on macOS. If a binary package has vendored subpackages, it is assumed that the top-level package includes the vendored packages' files in its wheel manifest.
2 changes: 1 addition & 1 deletion src/briefcase/platforms/macOS/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def find_binary_packages(
are in the install path that are non-universal and non-pure.
"""
binary_packages = []
for distinfo in install_path.glob("**/*.dist-info"):
for distinfo in install_path.glob("*.dist-info"):
# Read the WHEEL file in the dist-info folder.
# Use this to determine if the wheel is "pure", and the tag
# for the wheel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ def test_find_binary_packages(dummy_command, tmp_path):
"binary-package-2",
version="3.4.6",
tag="macOS_13_arm64",
extra_content=[
# A vendored, but incomplete .dist-info folder. See #1970
("vendored/nested-incomplete.dist-info/LICENSE", "Nested License", 0o644),
],
)
# A vendored .dist-info folder. This *isn't* found and processed.
create_installed_package(
tmp_path / "app-packages/binary-package-2/vendored",
"nested-package",
version="9.9.9",
tag="macOS_13_arm64",
)

binary_packages = dummy_command.find_binary_packages(
Expand Down

0 comments on commit af1430a

Please sign in to comment.