New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix scipy so it builds on OS X Lion #11886
Comments
patch for scipy pkg, for review only |
This comment has been minimized.
This comment has been minimized.
comment:1
Attachment: trac_11886-scipy.patch.gz |
comment:2
They should really fix the hundreds of warnings... Builds on Solaris (SPARC), with GCC 4.5.1 (on mark2) at least. |
This comment has been minimized.
This comment has been minimized.
comment:4
These were the changes I had to make before. Builds on Lion for me. |
Reviewer: Mike Hansen |
comment:5
Minor thing (another copy-paste accident): The changelog entries should have diff --git a/SPKG.txt b/SPKG.txt
--- a/SPKG.txt
+++ b/SPKG.txt
@@ -26,20 +26,24 @@
* Python, which in Sage has numerous dependencies
* Numpy
* Fortran
+ * GNU patch
== Special Update/Build Instructions ==
- * None
+ * Make sure the patches still apply.
+ The ones added in the scipy-0.9.p0 spkg (#11886) were all taken from
+ (unstable) upstream, so can presumably be removed once we upgrade to
+ a new stable version.
== Changelog ==
-== scipy-0.9.p0 (John Palmieri, 30 Sept 2011) ==
+=== scipy-0.9.p0 (John Palmieri, 30 Sept 2011) ===
* #11886: get scipy to build on OS X 10.7 Lion, using the patches from
https://github.com/scipy/scipy/commit/effa6f68f8ada57b79864852b609ff06d2527306
-== scipy-0.9 (F. Bissey; 16 March 2011) ===
+=== scipy-0.9 (F. Bissey; 16 March 2011) ===
* updated the source to 0.9.0. No patches needed.
-== scipy-0.8 (S. Reiterer, F. Bissey, D. Kirkby, J. H. Palmieri; 14 October 2010) ===
+=== scipy-0.8 (S. Reiterer, F. Bissey, D. Kirkby, J. H. Palmieri; 14 October 2010) ===
* #9808 Upgrade to scipy 0.8.
* Deleted outdated patches
* spkg install changed by F. Bissey, because g95 makes trouble on OS X. (The merger script is btw. likely to reject the spkg otherwise.)
GNU patch should be added to the dependencies. (See diff above). if [ $? -ne 0 ]; then
echo "Error patching setup.py"
exit 1
fi should get removed, since no patch gets applied to There are a few typos in the comments, and diff --git a/spkg-install b/spkg-install
--- a/spkg-install
+++ b/spkg-install
@@ -1,10 +1,18 @@
#!/usr/bin/env bash
-# These flags confuse numpy's distutils. In particular,
+
+if [ -z "$SAGE_LOCAL" ]; then
+ echo >&2 "Error: SAGE_LOCAL undefined - exiting..."
+ echo >&2 "Maybe run 'sage -sh'?"
+ exit 1
+fi
+
+# These flags confuse numpy's distutils. In particular,
# if they are set empty bad things happen.
+unset CFLAGS CXXFLAGS SHAREDFLAGS
+echo "Note: CFLAGS, CXXFLAGS and SHAREDFLAGS are taken from distutils,"
+echo " so their current settings are ignored."
-unset CFLAGS CXXFLAGS SHAREDFLAGS
-
-if [ `uname` = "Darwin" ]; then
+if [ "$UNAME" = "Darwin" ]; then
unset ATLAS
unset BLAS
unset LAPACK
@@ -23,43 +31,38 @@
export F90="$SAGE_LOCAL/bin/sage_fortran"
export F95="$SAGE_LOCAL/bin/sage_fortran"
-
-# This avoid problems on some systems -- until we officially
-# support umfpack (which we will likely do, since cvxopt
-# I think includes it).
-# http://projects.scipy.org/pipermail/scipy-user/2006-July/008661.html
-# (Currently swig gets invoked by scipy when building the umfpack interace,
+# This avoids problems on some systems -- until we officially
+# support umfpack (which we will likely do, since cvxopt I think includes it):
+UMFPACK="None"; export UMFPACK
+# See http://projects.scipy.org/pipermail/scipy-user/2006-July/008661.html
+# (Currently SWIG gets invoked by scipy when building the umfpack interface,
# which is bad.)
-UMFPACK="None"; export UMFPACK
+
+# Remove previous installation (if any):
rm -rf "$SAGE_LOCAL"/lib/python/site-packages/scipy
cd src/
+# Apply patches (if any):
for patch in ../patches/*.patch; do
patch -p1 <"$patch"
if [ $? -ne 0 ]; then
- echo >&2 "Error applying '$patch'"
+ echo >&2 "Error applying '$patch'."
exit 1
fi
done
+# Build:
+python setup.py build
if [ $? -ne 0 ]; then
- echo "Error patching setup.py"
- exit 1
-fi
-
-# Build
-python setup.py build
-if [ $? -ne 0 ]; then
- echo "Error building scipy."
+ echo >&2 "Error building scipy."
exit 1
fi
-# Intall
-python setup.py install
+# Install:
+python setup.py install
if [ $? -ne 0 ]; then
- echo "Error installing scipy."
+ echo >&2 "Error installing scipy."
exit 1
fi
- (Take whatever you like, or I could upload an updated spkg.) I'm not sure whether we should only remove an old installation upon a successful build, after |
Upstream: Fixed upstream, but not in a stable release. |
Changed reviewer from Mike Hansen to Mike Hansen, Leif Leonhardy |
This comment has been minimized.
This comment has been minimized.
comment:6
FWIW, there are so many changes, I've made a p1: http://sage.math.washington.edu/home/leif/Sage/spkgs/scipy-0.9.p1.spkg |
Diff between John's p0 and my p1. For reference / review. |
comment:7
Attachment: scipy-0.9.p0-p1.diff.gz Looks good to me. The only change I might consider in addition is this: diff --git a/SPKG.txt b/SPKG.txt
--- a/SPKG.txt
+++ b/SPKG.txt
@@ -33,6 +33,11 @@ BSD terms. See http://www.scipy.org/Lice
The ones added in the scipy-0.9.p0 spkg (#11886) were all taken from
(unstable) upstream, so can presumably be removed once we upgrade to
a new stable version.
+ * To do: in spkg-install, should we only remove the previous
+ installation after successfully building the new one? That is, is
+ it safe to move 'rm -rf "$SAGE_LOCAL"/lib/python/site-packages/scipy'
+ so it is between 'python setup.py build' and 'python setup.py
+ install'?
== Changelog ==
|
comment:8
I've attached a diff with my changes w.r.t. John's spkg. |
Milestone sage-4.7.3 deleted |
comment:11
By the way, this builds and doctests pass on a variety of platforms. |
Merged: sage-4.8.alpha1 |
As the summary says. The new spkg applies the patches from this commit to the scipy github repo. New spkg at
The home base for this ticket is the Lion ticket #11881.
Upstream: Fixed upstream, but not in a stable release.
CC: @nexttime @mwhansen
Component: packages: standard
Keywords: scipy spkg upgrade update lion darwin 11
Author: John Palmieri
Reviewer: Mike Hansen, Leif Leonhardy
Merged: sage-4.8.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/11886
The text was updated successfully, but these errors were encountered: