-
Notifications
You must be signed in to change notification settings - Fork 132
Mac OSX Build
Ethan White edited this page Jul 27, 2015
·
7 revisions
Notes on successfully building the Retriever on OSX.
This build will allow you to successfully build the Mac App for distribution to other systems.
- If running OS X 10.8+ go to
System Preferences -> Security & Privacy -> General
and selectAllow apps downloaded from Anywhere
. This is necessary because GateKeeper will try to prevent this installation. You can return this setting to its previous state following the installation. - Install the Python 2.7 Installer from the Python download site (double click the dmg and then double click the installer). Use the Mac OS X 64-bit/32-bit x86-64/i386 Installer for Mac OS X 10.6 and later unless you have a good reason to do otherwise.
- Install the wxPython Installer from the wxPython site. Use the Cocoa build unless you have a good reason to do otherwise.
- Install setuptools (if you haven't already)
- Download ez_setup.py
- Navigate to the directory where you downloaded it and run
sudo python ez_setup.py
)
- Install pip:
easy_install pip
- Use pip to install the xlrd
pip install xlrd
- Use pip to install any desired optional dependencies
pip install PyMySQL MySQL-python psycopg2 py2app
- You will need all of these dependencies if you want to build the Mac App for distribution
Homebrew works great if you just want to install the Retriever from source on your own machine, but at least based on this recipe it does not support distribution of the Mac App to other versions of OS X (i.e., if you build the App on OS X 10.9 it will only run on 10.9)
- Install Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
- Install Xcode
- Install Python
brew install python
- Install the Xcode command line tools
xcode-select --install
- Install wxPython using Homebrew
brew install --python wxmac --devel
. NOTE: This takes a very long time - Make brew's Python the default
echo export PATH='usr/local/bin:$PATH' >> ~/.bash_profile
- Install xlrd via pip
pip install xlrd
. Nosudo
is necessary since we're using brew. - Install py2app via pip
pip install py2app
. - Clone the Retriever
git clone git@github.com:weecology/retriever.git
- Switch directories
cd retriever
- Standard install
python setup.py install
If you also want to install the dependencies for MySQL and PostgreSQL this can be done using a combination of homebrew and pip.
brew install mysql
- Follow the instructions from
brew
for starting MySQL brew install postgresql
- Follow the instructions from
brew
for starting Postgres sudo pip install pymysql MySQL-python psycopg2
MySQL-python
should be installed in addition to pymysql
for building the .app
file since pymysql is not currently working properly in the .app
.
- This hasn't been tested yet, but
conda
now supportswxpython
(and all other required modules). See: https://binstar.org/anaconda/wxpython for information on installwxpython
.