Skip to content

Instantly share code, notes, and snippets.

View bpteague's full-sized avatar

Brian Teague bpteague

View GitHub Profile
@bpteague
bpteague / OS X Code Signing Pyinstaller.md
Last active February 21, 2025 01:05 — forked from txoof/OS X Code Signing Pyinstaller.md
PyInstaller recipe for codesigning an OSX .app bundle

This worked as of Feb 17 2025, on OSX Sonoma 14.7.2, using PyInstaller 6.12.0. And this packaged a very nontrivial app, which you can now download from https://cytoflow.readthedocs.io.

Setup

  • Create a developer account with Apple
  • Download and install XCode from the App Store.
    • open XCode and install all of the command-line tools when it asks.
  • Create a certificate signing request (CSR)
  • Launch the "Keychain Access" utility
@bpteague
bpteague / rthook_multiprocessing.py
Last active March 25, 2020 12:20
Multiprocessing realtime hook to fix spawn mode for frozen processes on POSIX OSes that use the semaphore tracker
import sys, os, re
import multiprocessing
import multiprocessing.spawn as spawn
# prevent spawn from trying to read __main__ in from the main script
multiprocessing.process.ORIGINAL_DIR = None
def _freeze_support():
if 'multiprocessing.semaphore_tracker' in sys.argv[-1]: