[sagemath] 02/06: Don't set a different SAGE_ROOT when in sage source directory.

Tobias Hansen thansen at moszumanska.debian.org
Fri Dec 2 23:37:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository sagemath.

commit 7088267b193ec8badbf5d0ce4bf515d4abc151f0
Author: Tobias Hansen <thansen at broeselmaschine.fc.up.pt>
Date:   Fri Dec 2 19:33:10 2016 +0000

    Don't set a different SAGE_ROOT when in sage source directory.
---
 debian/patches/debian-install-paths.patch | 16 ++++++++++------
 debian/rules                              |  1 +
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/debian/patches/debian-install-paths.patch b/debian/patches/debian-install-paths.patch
index 1307228..eaa5a28 100644
--- a/debian/patches/debian-install-paths.patch
+++ b/debian/patches/debian-install-paths.patch
@@ -14,10 +14,14 @@ Forwarded: not-needed
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/sage/src/bin/sage-env
 +++ b/sage/src/bin/sage-env
-@@ -118,6 +118,10 @@
-     NEW_SAGE_ROOT="."
- elif [ -f ../../sage -a -d ../../build ]; then
-     NEW_SAGE_ROOT="../.."
+@@ -114,10 +114,10 @@
+ # or a guessed value based on pwd.
+ if [ -n "$SAGE_ROOT" ]; then
+     NEW_SAGE_ROOT="$SAGE_ROOT"
+-elif [ -f sage -a -d build ]; then
+-    NEW_SAGE_ROOT="."
+-elif [ -f ../../sage -a -d ../../build ]; then
+-    NEW_SAGE_ROOT="../.."
 +elif [ "$(which "$(basename "$0")")" = "$0" ]; then
 +    export SAGE_LOCAL="${SAGE_LOCAL:-$(dirname $(dirname "$0"))}"
 +    SAGE_ROOT="$SAGE_LOCAL"
@@ -25,7 +29,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  else
      # No idea what SAGE_ROOT should be...
      echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
-@@ -128,17 +132,6 @@
+@@ -128,17 +128,6 @@
  # Make NEW_SAGE_ROOT absolute
  NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
  
@@ -43,7 +47,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  # Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
  if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
      echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
-@@ -420,8 +413,10 @@
+@@ -420,8 +409,10 @@
      export PYTHONHOME
  fi
  
diff --git a/debian/rules b/debian/rules
index b3387b2..a39c784 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,7 @@ export CCACHE_BASEDIR := $(CURDIR)/debian/build
 $(shell mkdir -p "$(CCACHE_DIR)")
 endif
 
+export SAGE_ROOT = $(shell pwd)/sage
 export SAGE_LOCAL = $(shell pwd)/debian/build/usr
 export PYTHONPATH = $(shell pwd)/debian/build/usr/lib/python2.7/dist-packages
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list