Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore vendored .dist-info folders. #1972

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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