Skip to content

Notes on freezing with Mac OS X

John Readey edited this page May 4, 2016 · 5 revisions

This page collects some notes after a successful freezing of HDF Compass on a Mac OS X running Yosemite. The notes assume a ideally clean machine, and they guide you to create a setup that is mainly based on brew.

Prerequisites

  • install xcode from app store, then execute from terminal: sudo xcodebuild -license
  • run updates on app Store, and after the download restart the machine
  • install brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • make visible the hidden files (optional):
    • defaults write com.apple.finder AppleShowAllFiles TRUE
    • killall Finder
  • create a ~/.profile file with this content: export PATH=/usr/local/bin:/usr/local/sbin:$PATH
  • install appdmg: brew install node then npm install -g appdmg
  • optionally, brew install pkg-config
  • close and reopen the terminal
  • test if the current brew installation has issues: brew doctor

Python installation

  • brew install python
  • pip install --upgrade pip setuptools matplotlib

Install WxPython

Install shapely

  • first install: brew install geos
  • pip install https://github.com/Toblerity/Shapely/archive/master.zip

Install libxml2 (for lxml)

  • brew install libxml2
  • set the headers for lxml:
    • sudo mkdir /usr/include
    • sudo ln -s /usr/local/Cellar/libxml2/2.9.3/include/libxml2 /usr/include/libxml2

Install hdf5 and gdal

  • brew install homebrew/science/hdf5 gdal

Install cartopy

  • first install: brew install proj
  • pip install cartopy[plotting]

Install BAG

  • pip install hydroffice.bag

HDF Compass installation

  • clone the HDF Compass repository (e.g., with SourceTree)
  • install it in dev mode: pip install -e .
  • test if it works: python HDFCompass.py

HDF Compass freezing

  • pip install pyinstaller
  • pip install --upgrade setuptools==19.2
  • pyinstaller --clean -y HDFCompass.1folder.spec
  • test if it works: ./dist/HDFCompass.app/Contents/MacOS/HDFCompass_0.6.0b3
  • finally execute: appdmg freeze/spec.json dist/HDFCompass.dmg