Version 23 (modified by wojciech, 4 years ago) (diff)

Build Instructions for OSX

Building the SasView application on Mac requires you to install python from python.org. The version of python bundled with OSX will cause py2app to produce an application property list that will not point to the python executable bundled in the application.

  • Run the deps.py script found at the top of the trunk branch in 32-bit mode:
    arch -i386 python2.6 deps.py
    

Install wxPython 2.8

Install Matplotlib 1.0.1

  • Modify the make.osx file so that it has the correct OSX version at the top:
    MACOSX_DEPLOYMENT_TARGET=10.7
    OSX_SDK_VER=10.7
    
  • Build and install matplotlib:
    make -f make.osx PREFIX=$HOME/.local PYVERSION=2.6 fetch deps mpl_install
    

Install Scipy 0.10.0

  • Create this following symbolic link (might vary slightly):
    cd /usr/local/lib; ln -sf /usr/lib/gcc/i686-apple-darwin11/4.2.1/libgcc.a libcc_dynamic.a
    
  • Build and install scipy:
    python2.6 setup.py install --user
    

Compile SasView

  • Build and install SansView using the setup.py script at the top of the trunk branch.
    python2.6 setup.py install --user
    
  • The installation process will automatically use easy-install to install lxml and periodictable. You can also install those by hand using
    easy_install-2.6 lxml
    easy_install-2.6 periodictable==1.3.0
    
  • Run SansView with:
    arch -i386 python2.6 sansview.py
    

Py2app extras

If you want to build a Mac application, you will need to install the following packages:

easy_install-2.6 altgraph==0.7.0
easy_install-2.6 modulegraph==0.8.1
easy_install-2.6 macholib==1.3
easy_install-2.6 py2app

Buliding SasView on MAC OSX 10.11 (El Capitan)

There are some issues with matplotlib and wxPython installation on 10.11 distribution. Below are listed potential solutions to this problems.

If Matplotlib complains about UTF-8 format, the simple solution includes adding two lines to ~/.bash_profile

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

However, if there is a problem with wxPython installation, namely cococa or carbon pacakges don't work, one can get away with these problems by installing wx through brew:

brew install wxpython --framework

Brew itself can be installed using

ruby -e "$(curl -fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install)"