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

bdist_mac: skip text files in set_relative_reference_paths #2102

Merged

Conversation

micahflee
Copy link
Contributor

I'm trying to make a release of OnionShare on an ARM64 Apple Silicon Mac. When run bdist_mac, it fails with this error:

Setting relative_reference_path for: Mach-O File: /Users/user/Library/Caches/pypoetry/virtualenvs/onionshare-aqknF-N0-py3.11/lib/python3.11/site-packages/cx_Freeze/initscripts/frozen_application_license.txt
Resolved rpath:
Loaded libraries:
Applying AdHocSignature
/Users/user/code/onionshare/desktop/build/OnionShare.app/Contents/MacOS/frozen_application_license.txt: No such file or directory
error: [Errno 2] No such file or directory: '/Users/user/code/onionshare/desktop/build/OnionShare.app/Contents/MacOS/frozen_application_license.txt'

Looking at the code I saw that the set_absolute_reference_paths function has similar code that skips txt and zip files, and so this makes set_relative_reference_paths skip text files too, as these can't be code signed. This patch fixes the issue I ran into.

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (8b6d744) 51.63% compared to head (ad8eb8e) 39.79%.

❗ Current head ad8eb8e differs from pull request most recent head 5f4a402. Consider uploading reports for the commit 5f4a402 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2102       +/-   ##
===========================================
- Coverage   51.63%   39.79%   -11.85%     
===========================================
  Files          72       72               
  Lines        5924     5926        +2     
===========================================
- Hits         3059     2358      -701     
- Misses       2865     3568      +703     
Files Coverage Δ
cx_Freeze/command/bdist_mac.py 51.02% <100.00%> (+0.40%) ⬆️

... and 16 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marcelotduarte
Copy link
Owner

What version of cx_Freeze did you use? I'm asking because in the latest version, only executables are copied to "Contents/MacOS", all other files are copied to the "Resources" directory:
https://github.com/marcelotduarte/cx_Freeze/blob/main/cx_Freeze/command/bdist_mac.py#L460-L468

@marcelotduarte marcelotduarte changed the title Skip text files in BdistMac.set_relative_reference_paths bdist_mac: skip text files in set_relative_reference_paths Oct 19, 2023
@marcelotduarte marcelotduarte merged commit e170e78 into marcelotduarte:main Oct 19, 2023
20 checks passed
marcelotduarte added a commit that referenced this pull request Oct 20, 2023
Co-authored-by: Marcelo Duarte <marcelotduarte@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants