Skip to content

Commit

Permalink
Remove stub binaries from repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Jun 5, 2024
1 parent e2d2682 commit 2ec160a
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 16 deletions.
17 changes: 1 addition & 16 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
from pathlib import Path


BIN_PATH = Path("{{ cookiecutter.formal_name }}.app/Contents/MacOS")

# Rename the stub binary we want to "Stub""
STUB_PATH = (
BIN_PATH
/ "{% if cookiecutter.console_app %}Console{% else %}GUI{% endif %}-Stub-{{ cookiecutter.python_version|py_tag }}"
)
STUB_PATH.rename(BIN_PATH / "Stub")

# Delete all stubs that aren't for the Python version and app type
# that we are targeting
for stub in BIN_PATH.glob("*-Stub-*"):
stub.unlink()

# The codesign utility in recent macOS fails with obscure errors when presented with
# CRLF line endings, but in some configurations (e.g. global `core.autocrlf=true`)
# git may have checked out this repo in a way that put CRLF line endings in Entitlements.plist.
Expand All @@ -24,6 +9,6 @@
xml_content = ENTITLEMENTS_PATH.read_text()
ENTITLEMENTS_PATH.open('w', newline='\n').write(xml_content)

INFO_PATH = BIN_PATH.parent / 'Info.plist'
INFO_PATH = Path("{{ cookiecutter.formal_name }}.app/Contents/Info.plist")
info_content = INFO_PATH.read_text()
INFO_PATH.open('w', newline='\n').write(info_content)
1 change: 1 addition & 0 deletions {{ cookiecutter.format }}/briefcase.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ support_path = "{{ cookiecutter.formal_name }}.app/Contents/Resources/support"
"3.11": "support_revision = 3",
"3.12": "support_revision = 2",
}.get(cookiecutter.python_version|py_tag, "") }}
stub_binary_revision = "8"
cleanup_paths = [
"{{ cookiecutter.formal_name }}.app/Contents/Resources/support/Python.xcframework",
"{{ cookiecutter.formal_name }}.app/Contents/Resources/support/platform-site",
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 2ec160a

Please sign in to comment.