Skip to content

Commit

Permalink
Check numpy versiob for bdist_mpkg.
Browse files Browse the repository at this point in the history
Scipy binaries targetting different python versions require to be built against
different numpy versions (2.6 requires numpy 1.3.0, for example). So we check
those explcitly, and barf if we do not have matching version.
  • Loading branch information
cournape committed Jun 5, 2009
1 parent d09cb78 commit 6f93583
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pavement.py
Expand Up @@ -433,6 +433,13 @@ def bdist_mpkg():
except AttributeError:
pyver = PYVER

numver = parse_numpy_version(MPKG_PYTHON[pyver])
numverstr = ".".join(["%i" % i for i in numver])
if pyver == "2.5" and not numver[:2] == (1, 2):
raise ValueError("Scipy 0.7.x should be built against numpy 1.2.x for python 2.5 (detected %s)" % numverstr)
elif pyver == "2.6" and not numver[:2] == (1, 3):
raise ValueError("Scipy 0.7.x should be built against numpy 1.3.x for python 2.6 (detected %s)" % numverstr)

prepare_static_gfortran_runtime("build")
ldflags = "-undefined dynamic_lookup -bundle -arch i386 -arch ppc -Wl,-search_paths_first"
ldflags += " -L%s" % os.path.join(os.path.dirname(__file__), "build")
Expand Down

0 comments on commit 6f93583

Please sign in to comment.