#9808: Upgrade numpy to 1.5.0 and scipy to 0.8
----------------------------------------------------------+-----------------
Reporter: maldun | Owner:
maldun
Type: task | Status:
closed
Priority: major | Milestone:
sage-4.6.1
Component: packages | Resolution:
fixed
Keywords: numpy, scipy | Author:
Stefan Reiterer, François Bissey, John Palmieri, David Kirkby, Karl-Dieter
Crisman
Upstream: Fixed upstream, but not in a stable release. | Reviewer:
Karl-Dieter Crisman, David Kirkby, Leif Leonhardy, François Bissey
Merged: sage-4.6.1.alpha0 | Work_issues:
----------------------------------------------------------+-----------------
Comment(by leif):
Replying to [comment:266 jhpalmieri]:
> Replying to [comment:264 fbissey]:
> > Better use plain 'uname' as it should return Darwin for you if I am
not mistaken.
>
> No, the point is you want to test not only for Darwin, but for Darwin
version 10.6, as opposed to 10.5 or 10.4. {{{uname -r}}} should return
strings like 10.4.0, 9.3.1, and 8.8.0, respectively, for these (I think).
(The last parts of the string, like 4.0 or 3.1 or 8.0, are the minor
version numbers, which I don't think we care about.)
>
> This seems to work for me, but I'm not a sed expert:
{{{
VER=`uname -r | sed 's/\([0-9]*\)\..*/\1/'`
}}}
> (This takes the output from uname -r, sends it to sed, which does a
regular expression match to return the digits found before the first
period.) Then you do something like
{{{
if [ $VER -ge 10 ]; then
...
fi
}}}
> (Might as well test whether VER is at least 10, rather than equal to 10
on the nose.)
Just for the record:
The easiest (and by the way more efficient and less error-prone) way to
test for e.g. Darwin 8 / MacOS X 10.4 / Tiger is to use the (Bourne)
shell's built-in pattern matching:
{{{
#!sh
case "$UNAME" in # set in sage-env
Darwin)
case "`uname -r`" in # quotes not mandatory
8*) # Tiger / 10.4
...
;;
9*) # Leopard / 10.5
...
;;
10*) # Snow Leopard / 10.6
...
;;
*) # other, "default"
...
esac
# add other OSs like Linux here if appropriate
esac
}}}
Or, if you want to use `sed` or `tr`, something like:
{{{
#!sh
os_with_ver=`uname -sr | sed -e 's/ /-/g'` # order of options to 'uname'
doesn't matter
os_with_ver_and_arch=`uname -srm | tr ' ' '-'` # using the simpler
'tr'(anslate) command
case $os_with_ver in
Darwin-8*) # Tiger / Darwin 8 / MacOS X 10.4
...
;;
...
esac
# More specific:
case $os_with_ver_and_arch in
Darwin-8*-ppc) # Tiger / Darwin 8 / MacOS X 10.4 on PPC (32-bit)
...
;;
Darwin-9*-ppc64) # Leopard / Darwin 9 / MacOS X 10.5 on PPC (64-bit)
...
;;
Linux-*-x86_64|Linux-*-ia64) # Any 64-bit Linux version on Intel
...
;;
Linux-*-i[3456]86) # Any 32-bit Linux version on Intel
...
;;
...
esac
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9808#comment:303>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.