Ticket #13448: trac13448.patch

File trac13448.patch, 2.7 KB (added by ohanar, 9 years ago)

apply to root repo

  • Makefile

    # HG changeset patch
    # User R. Andrew Ohana <andrew.ohana@gmail.com>
    # Date 1347409617 25200
    # Node ID 971006536398caeaa4f6f5ccdee19ad8ee7e6c92
    # Parent  829f209f54506a4e58b96795b1fd7d610672cf0e
    source sage-env in spkg/install
    
    diff --git a/Makefile b/Makefile
    a b  
    1313all: start doc  # indirectly depends on build
    1414
    1515build:
    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"
    2019        ./sage -b
    2120
    2221# ssl: build Sage, and also install pyOpenSSL. This is necessary for
  • spkg/bin/sage-spkg

    diff --git a/spkg/bin/sage-spkg b/spkg/bin/sage-spkg
    a b  
    9191# Set environment variables
    9292##################################################################
    9393
    94 # The following sets environment variables for building packages.
    95 # Since this is sourced, it returns a non-zero value on errors rather
    96 # than exiting.  Using dot suggested by W. Cheung.
    97 . "$SAGE_ROOT/spkg/bin/sage-env"
    98 
    99 if [ $? -ne 0 ]; then
    100     echo >&2 "Error setting environment variables by sourcing '$SAGE_ROOT/spkg/bin/sage-env';"
     94if [ -z "$SAGE_ROOT" ]; then
     95    echo >&2 "It does not appear sage-spkg has been run from withen the Sage environment;"
    10196    echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
    10297    exit 1
    10398fi
  • spkg/install

    diff --git a/spkg/install b/spkg/install
    a b  
    11#!/usr/bin/env bash
    22
    33########################################################################
    4 # Set various environment variables
     4# Set environment variables
    55########################################################################
    66
    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 non-zero value on errors rather
     9# than exiting.  Using dot suggested by W. Cheung.
     10. spkg/bin/sage-env
     11
     12if [ $? -ne 0 ]; then
     13    echo >&2 "Error setting environment variables by sourcing '$SAGE_ROOT/spkg/bin/sage-env';"
     14    echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
     15    exit 1
     16fi
     17
     18# move into the spkg directory for the rest of the installation process
     19cd spkg
    1520
    1621# Storing the start time of the build process. The time is stored in
    1722# seconds since 1970-01-01 in a hidden file called