[sagemath] 01/01: Better way of fixing paths, should work even if there is another system-wide install
Ximin Luo
infinity0 at debian.org
Mon Oct 17 00:53:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository sagemath.
commit 973d616ba92d920cee90e496aaa76cb524d3db35
Author: Ximin Luo <infinity0 at debian.org>
Date: Mon Oct 17 02:48:03 2016 +0200
Better way of fixing paths, should work even if there is another system-wide install
---
debian/patches/debian-install-paths.patch | 26 ++++++++++++++--------
.../fixsage-allow-override-sage-local.patch | 4 ++--
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/debian/patches/debian-install-paths.patch b/debian/patches/debian-install-paths.patch
index 3c35076..f9bc60b 100644
--- a/debian/patches/debian-install-paths.patch
+++ b/debian/patches/debian-install-paths.patch
@@ -20,17 +20,16 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@echo "Deleting Sage library build artifacts..."
--- a/sage/src/bin/sage-env
+++ b/sage/src/bin/sage-env
-@@ -109,6 +109,10 @@
- echo "$out"
- }
-
-+if [ "$(which "$(basename "$0")")" = "$0" ]; then
+@@ -118,6 +117,9 @@ 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
+ SAGE_LOCAL="${SAGE_LOCAL:-$(dirname $(dirname "$0"))}"
+ SAGE_ROOT="$SAGE_LOCAL"
-+fi
-
- # New value for SAGE_ROOT: either SAGE_ROOT (if given)
- # or a guessed value based on pwd.
+ 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 @@
# Make NEW_SAGE_ROOT absolute
NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
@@ -93,6 +92,15 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
m.include_dirs = m.include_dirs + libgap_include_dirs + include_dirs
+@@ -624,7 +631,7 @@
+ print('Cleaning up stale installed files....')
+ t = time.time()
+ from sage_setup.clean import clean_install_dir
+-output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*'))
++output_dirs = [SAGE_LIB] + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*'))
+ for output_dir in output_dirs:
+ print('- cleaning {0}'.format(output_dir))
+ clean_install_dir(output_dir, python_packages, python_modules,
--- a/sage/sage
+++ b/sage/sage
@@ -22,6 +22,7 @@
diff --git a/debian/patches/fixsage-allow-override-sage-local.patch b/debian/patches/fixsage-allow-override-sage-local.patch
index c9ed409..4d11a38 100644
--- a/debian/patches/fixsage-allow-override-sage-local.patch
+++ b/debian/patches/fixsage-allow-override-sage-local.patch
@@ -24,7 +24,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
export SAGE_DOC_SRC="$SAGE_SRC/doc"
--- a/sage/src/sage/env.py
+++ b/sage/src/sage/env.py
-@@ -77,7 +77,7 @@ def _add_variable_or_fallback(key, fallback, force=False):
+@@ -77,7 +77,7 @@
if force:
value = fallback
if isinstance(value, six.string_types):
@@ -95,7 +95,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
"$SAGE_LOCAL/bin" "$SAGE_LOCAL/etc" \
--- a/sage/src/setup.py
+++ b/sage/src/setup.py
-@@ -615,7 +615,7 @@
+@@ -608,7 +608,7 @@
python_packages, python_modules = find_python_sources(
SAGE_SRC, ['sage', 'sage_setup'])
python_data_files = find_extra_files(python_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