#Horus development in Mac OS X
If you are a developer and you want to modify the code, contribute, build packages, etc. you may follow this steps
Download open source Atom code editor.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew install gitInstall non-system, framework-based, universal Python. Not with brew.
pip install -U pip setuptools
pip install -U virtualenvFirst you need to configure a virtualenv
virtualenv $HOME/venvIn order to use wxPython from the virtualenv this hack is needed
cp `which python` $HOME/venv/bin/python;
echo 'export PYTHONHOME=$HOME/venv' >> $HOME/venv/bin/activate;
source $HOME/venv/bin/activateThen, you can install the python dependencies into the virtualenv
brew tap homebrew/science
brew info opencv
brew install opencvln -s /usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv.py $HOME/venv/lib/python2.7/site-packages;
ln -s /usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv2.so $HOME/venv/lib/python2.7/site-packagesbrew install wxpythonln -s /usr/local/Cellar/wxpython/3.0.2.0/lib/python2.7/site-packages/wx* $HOME/venv/lib/python2.7/site-packagespip install -U pyserial pyopengl pyopengl-accelerate numpy scipy matplotlib==1.4.0- Install Xcode.app. Then, switch xcode commands and accept the xcodebuild license
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild- Downgrade setuptools
pip install -U setuptools==3.4- Install qtkit 2.5.1
pip install -U pyobjc-core==2.5.1
pip install -U pyobjc-framework-cocoa==2.5.1
pip install -U pyobjc-framework-quartz==2.5.1
pip install -U pyobjc-framework-qtkit==2.5.1- Restore setuptools
pip install -U setuptoolsIn order to generate dmg package, some extra dependencies are needed
pip install -U py2app==0.7.2Also some patches are needed to make py2app work
cd $HOME/venv/lib/python2.7/site-packages/py2app/recipes;
sed -i '' 's/scan_code/_scan_code/g' virtualenv.py;
sed -i '' 's/load_module/_load_module/g' virtualenv.py;
cd $HOME/venv/lib/python2.7/site-packages/macholib;
sed -i '' 's/loader=loader.filename/loader_path=loader.filename/g' MachOGraph.pyTo reduce the package size, "tests" directories must be removed
cd $HOME/venv/lib/python2.7/site-packages;
find . -name tests -type d -exec rm -r {} +All source code is available on GitHub. You can download main Horus project by doing:
git clone https://github.com/bq/horus.git
cd horusIn the project directory, execute the command:
./horusHorus development comes with a script package.sh. This script generates a final release package. You should not need it during development, unless you are changing the release process. If you want to distribute your own version of Horus, then the package.sh script will allow you to do that.
bash package.sh darwin # Generate dmg package