# HG changeset patch
# User R. Andrew Ohana <andrew.ohana@gmail.com>
# Date 1341136674 25200
# Node ID 6cb735b7475bb7333e8d7e954a0dd8c7f2c509a7
# Parent 4c2f31701c6182f33e4bdd42abf0f3815f318c7a
use setuptools "setup.py develop" for better tracebacks
diff git a/sagebuild b/sagebuild
a

b


1  1  #!/usr/bin/env bash 
2  2  
3   if [ z "$SAGE_LOCAL" ]; then 
4   echo 
5   echo "SAGE_LOCAL undefined ... exiting" 
6   return 1 
7   fi 
 3  die() { 
 4  echo >&2 "$@" 
 5  exit 1 
 6  } 
 7  
 8  [ n "$SAGE_LOCAL" ]  die "SAGE_LOCAL undefined ... exiting" 
8  9  
9  10  build() { 
10  11  if [ d "$SAGE_ROOT/devel/$1/" ]; then 
11  12  cd "$SAGE_ROOT/devel/$1/" 
12   chmod +x ./install 
13  13  echo "" 
14  14  echo "" 
15  15  echo "sage: Building and installing modified Sage library files." 
… 
… 

26  26  echo "Installing c_lib" 
27  27  CUR=`pwd` 
28  28  cd "c_lib" 
29   scons Q install 
30   # make sure c_lib install went okay 
31   if [ $? ne 0 ]; then 
32   echo >&2 "Error building c_lib." 
33   exit 1 
34   fi 
 29  scons Q install  
 30  die "Error building c_lib." 
35  31  cd "$CUR" 
36  32  
37   ./install "$SAGE_ROOT" 
38   if [ $? ne 0 ]; then 
39   echo >&2 "Error installing modified $1 library code." 
40   exit 1 
41   fi 
 33  python setup.py install  
 34  die "Error installing modified $1 library code." 
 35  
 36  # remove the sage symlink if it exists  this is for upgrading purposes 
 37  rm f "$SAGE_LOCAL/lib/python/sitepackages/sage" 
42  38  fi 
43  39  } 
44  40  
… 
… 

52  48  if [ "$1" != "" ]; then 
53  49  # make devel/sage point to devel/$1 
54  50  cd "$SAGE_ROOT/devel/" 
55   if [ ! d "sage$1" ]; then 
56   # this will happen a lot because of people (=me) making typos. 
57   echo >&2 "No such branch '$SAGE_ROOT/devel/sage$1'" 
58   echo >&2 "Use 'sage clone' to create a new branch." 
59   exit 1 
60   fi 
 51  # this will happen a lot because of people (=William) making typos. 
 52  [ d "sage$1" ]  die "No such branch '$SAGE_ROOT/devel/sage$1'\nUse 'sage clone' to create a new branch." 
61  53  # On Solaris (and perhaps other systems), "ln snf FILE LINK" 
62  54  # doesn't remove LINK and then relink it, so we need to first 
63  55  # delete LINK  in this case, SAGE_ROOT/devel/sage  and then 
… 
… 

67  59  ln s "sage$1" sage 
68  60  fi 
69  61  
70   if [ ! d "$SAGE_ROOT/devel/sage" ]; then 
71   echo >&2 "There is no directory '$SAGE_ROOT/devel/sage'" 
72   exit 1 
73   fi 
 62  [ d "$SAGE_ROOT/devel/sage" ]  die "There is no directory '$SAGE_ROOT/devel/sage'" 
74  63  
75  64  if [ $DO_BUILD_ALL = 1 ]; then 
76  65  CUR=`pwd` 