Skip to content

Build environment setup on OS X 10.12 Sierra

Gagik Vardanyan edited this page May 10, 2017 · 40 revisions
  1. Install Xcode from AppStore
  2. Install Xcode command line tools
xcode-select --install
  1. Install home-brew package manager
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Add the necessary 'taps'
brew tap homebrew/science
brew tap mantidproject/mantid
brew tap caskroom/cask
brew tap cartr/qt4
brew tap-pin cartr/qt4
  1. Install the necessary dependencies
brew cask install mactex
brew install openssl
brew install cmake
brew install qt@4 --build-bottle
brew install sip --build-from-source
brew install pyqt@4 --build-from-source
brew install qscintilla2qt4 --build-from-source
brew install poco
brew install boost --c++11
brew install boost-python --c++11 --build-from-source
brew install gsl
brew install hdf5 --c++11
brew install libmxml
brew install muparser
brew install nexusformat --c++11
brew install jsoncpp
brew install tbb --c++11
brew install opencascade --build-bottle
brew install qwt5
brew install qwtplot3d
brew install google-perftools
brew install librdkafka
  1. Uninstall the brew python
brew uninstall --ignore-dependencies python3
  1. Install pip python package manager
sudo easy_install pip
  1. Install necessary python packages with pip
sudo -H pip install sphinx --ignore-installed
sudo -H pip install "ipython[notebook]==3.2.1"
sudo -H pip install pycifrw
sudo -H pip install PyYAML==3.10
sudo -H pip install mock==1.0.1
sudo pip install sphinx_bootstrap_theme
sudo pip install psutil
  1. Install h5py
brew install h5py
  1. Add Homebrew’s site-packages to your python path.
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
  1. Git clone mantid repository

  2. Disable the system integrity protection

  3. Patch the header

  4. Enable again the system integrity protection

CAVEATS:

OPENSSL:

A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs

and run /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include

SIP:

The sip-dir for Python is /usr/local/share/sip.

Python modules have been installed and Homebrew's site-packages is not in your Python sys.path, so you will not be able to import the modules this formula installed. If you plan to develop with these modules, please run: mkdir -p /Users/vardanyan/Library/Python/2.7/lib/python/site-packages echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/vardanyan/Library/Python/2.7/lib/python/site-packages/homebrew.pth