scipy/scipy — pull request #2620 by pv (2013-07-07 18:24:42+00:00)
Title: BDL: Disable Accelerate/LAPACK on OSX

The LAPACK bundled with Accelerate on OSX 10.7+ [causes problems for ARPACK](http://forge.scilab.org/index.php/p/arpack-ng/issues/1259/). This is either a bug in ARPACK or Accelerate, but in the meantime we need to do something in Scipy, as I doubt the problem will be resolved any time soon.

What is done here:

1. Prevent automatic linking against the full Accelerate framework, allowing autodetection of only the BLAS component
2. Refuse to compile Scipy with BLAS or LAPACK libraries having an imcompatible Fortran ABI

The point (1) is necessary because of the unresolved incompatibility between ARPACK and Accelerate.

The point (2) is required because the coverage of Fortran ABI wrappers currently in Scipy master is insufficient --- many LAPACK and BLAS routines that are susceptible to Fortran ABI incompatibilities are not called via a C-API.

Another point for (2) is that on OSX it is easy for an unsuspecting user to use a LAPACK library compiled with wrong compiler flags.

These ABI restrictions affect only building Scipy and don't infect 3rd party packages --- which Fortran ABI a certain Python module is compiled against does not affect other Python modules.

The practical effect on OSX users who wish to use the BLAS part of Accelerate is that they need to download and build LAPACK sources with the `-ff2c` Fortran flag enabled. This is somewhat simpler than compiling e.g. ATLAS.

Fixes: gh-2143 (both the BLAS and ARPACK failures), gh-2248, gh-2547