I am trying to build obspy from the github repo on mac OS 10.9.4.
There don't appear to be any build instructions (?) so I'm kind of guessing here.
Also, I'm just learning python so I'm not entirely clear on how python finds/wraps native object code.
I think I need to descend into the src directories, make a library, and then copy/install this
into the /lib directory for the various obspy python modules to find (?)
This is pretty easy for something like src/mseed - it compiles right out of the box into libmseed.a
However, the signal library (../obspy/signal/src) makefiles aren't so clear.
There are different Makefiles for each platform, and the one for mac (Makefile.mac) doesn't look right.
I can compile using the generic Makefile if I comment out the -L$(FFT) -l:fftpack_lite.so parts.
(when these expand, there is indeed a file fftpack_lite.so in the dir pointed to by $(FFT) but gcc
says it can't find it).
The resulting object file is: signal.so
I could copy this to /lib but I notice from the anaconda install that the signal object file is in:
So I guess my questions are:
1. Is there any overall build Makefile and/or script to build from the github repo without having to
manually make each object code and put it in the correct place ??
2. Are there any build instructions ?
3. Does it matter what the various object files are called (e.g., signal.so vs. libsignal_Darwin_64bit_py27.so)
and if so, where is this configured ?
instructions are here:
You really don’t need to do anything in any case. Assuming all of ObsPy’s dependencies as well as a C and Fortran compiler are available you can just do
$ git clone https://github.com/obspy/obspy.git
$ cd obspy
$ pip install -v -e .
This will compile everything and move it to the correct place. It will also attempt to install any missing dependencies. The “-e” flag on pip will result in an editable installation meaning that only a symlink will be put in the site-packages directory. Thus all changes in the code are reflected when executing ObsPy. So the setup.py script is kind of a Makefile for Python modules.
Make sure to uninstall any previously installed version of ObsPy!
$ pip uninstall obspy
Thanks for your reply.
I've spent a couple of hours installing/uninstalling/installing obspy
with various configs to make sure I understand how the install works
(e.g., from anaconda "pip install obspy" versus from the git dir "pip install ."
and with and without the "-e" pip flag).
My conclusion is that pip is doing a lot behind the scenes, and I have to
be very careful to remove all traces of obspy before re-installing or
else the dependencies get confused (and it's difficult to track down what's
happening). I guess it's mostly keeping track of the obspy-egg-info dir
so that python finds the correct paths (?)
One directory that ">pip uninstall obspy" seems to leave behind is:
But other than that, everything seems to be working now.
Thanks for your help!