# HG changeset patch
# User R. Andrew Ohana <andrew.ohana@gmail.com>
# Date 1347409617 25200
# Node ID 971006536398caeaa4f6f5ccdee19ad8ee7e6c92
# Parent 829f209f54506a4e58b96795b1fd7d610672cf0e
source sageenv in spkg/install
diff git a/Makefile b/Makefile
a

b


13  13  all: start doc # indirectly depends on build 
14  14  
15  15  build: 
16   cd spkg && \ 
17   "../$(PIPE)" \ 
18   "env SAGE_PARALLEL_SPKG_BUILD='$(SAGE_PARALLEL_SPKG_BUILD)' ./install all 2>&1" \ 
19   "tee a ../install.log" 
 16  "$(PIPE)" \ 
 17  "env SAGE_PARALLEL_SPKG_BUILD='$(SAGE_PARALLEL_SPKG_BUILD)' ./spkg/install all 2>&1" \ 
 18  "tee a install.log" 
20  19  ./sage b 
21  20  
22  21  # ssl: build Sage, and also install pyOpenSSL. This is necessary for 
diff git a/spkg/bin/sagespkg b/spkg/bin/sagespkg
a

b


91  91  # Set environment variables 
92  92  ################################################################## 
93  93  
94   # The following sets environment variables for building packages. 
95   # Since this is sourced, it returns a nonzero value on errors rather 
96   # than exiting. Using dot suggested by W. Cheung. 
97   . "$SAGE_ROOT/spkg/bin/sageenv" 
98   
99   if [ $? ne 0 ]; then 
100   echo >&2 "Error setting environment variables by sourcing '$SAGE_ROOT/spkg/bin/sageenv';" 
 94  if [ z "$SAGE_ROOT" ]; then 
 95  echo >&2 "It does not appear sagespkg has been run from withen the Sage environment;" 
101  96  echo >&2 "possibly contact sagedevel (see http://groups.google.com/group/sagedevel)." 
102  97  exit 1 
103  98  fi 
diff git a/spkg/install b/spkg/install
a

b


1  1  #!/usr/bin/env bash 
2  2  
3  3  ######################################################################## 
4   # Set various environment variables 
 4  # Set environment variables 
5  5  ######################################################################## 
6  6  
7   # Assume current directory is SAGE_ROOT/spkg 
8   SAGE_ROOT=`cd .. && pwd P` 
9   SAGE_LOCAL="$SAGE_ROOT/local" 
10   SAGE_SHARE="$SAGE_LOCAL/share" 
11   SAGE_LOGS="$SAGE_ROOT/spkg/logs" 
12   PATH="$SAGE_ROOT/spkg/bin:$SAGE_LOCAL/bin:$PATH" 
13   PYTHONPATH="$SAGE_LOCAL" 
14   export SAGE_ROOT SAGE_LOCAL SAGE_LOGS PATH PYTHONPATH 
 7  # The following sets environment variables for building sage. 
 8  # Since this is sourced, it returns a nonzero value on errors rather 
 9  # than exiting. Using dot suggested by W. Cheung. 
 10  . spkg/bin/sageenv 
 11  
 12  if [ $? ne 0 ]; then 
 13  echo >&2 "Error setting environment variables by sourcing '$SAGE_ROOT/spkg/bin/sageenv';" 
 14  echo >&2 "possibly contact sagedevel (see http://groups.google.com/group/sagedevel)." 
 15  exit 1 
 16  fi 
 17  
 18  # move into the spkg directory for the rest of the installation process 
 19  cd spkg 
15  20  
16  21  # Storing the start time of the build process. The time is stored in 
17  22  # seconds since 19700101 in a hidden file called 