[sagemath] 02/03: Make sage.doctest.sources.get_basename work in more situations
Ximin Luo
infinity0 at debian.org
Sat Jan 21 21:28:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository sagemath.
commit b779e265be34b6df42f1ec2b15d52fef2a0226f1
Author: Ximin Luo <infinity0 at debian.org>
Date: Sat Jan 21 17:39:47 2017 +0100
Make sage.doctest.sources.get_basename work in more situations
---
debian/patches/d1-install-paths.patch | 6 +++---
debian/patches/series | 1 +
debian/patches/u2-looser-doctest-basename.patch | 20 ++++++++++++++++++++
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/debian/patches/d1-install-paths.patch b/debian/patches/d1-install-paths.patch
index abb4de2..b15c9d5 100644
--- a/debian/patches/d1-install-paths.patch
+++ b/debian/patches/d1-install-paths.patch
@@ -186,9 +186,9 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -85,7 +85,7 @@
# If the file is in the sage library, we can use our knowledge of
# the directory structure
- dev = SAGE_SRC
-- sp = os.path.join(SAGE_LOCAL, 'lib', 'python', 'site-packages')
-+ sp = SAGE_LIB
+ dev = os.path.normpath(SAGE_SRC)
+- sp = os.path.normpath(os.path.join(SAGE_LOCAL, 'lib', 'python', 'site-packages'))
++ sp = os.path.normpath(SAGE_LIB)
if path.startswith(dev):
# there will be a branch name
i = path.find(os.path.sep, len(dev))
diff --git a/debian/patches/series b/debian/patches/series
index 0c5374a..45fdac7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,6 +29,7 @@ u2-fix-less-trivial-test-cases.patch
u2-fix-sympow-cachedir.patch
u2-scripts-dir.patch
u2-reproducible-docs.patch
+u2-looser-doctest-basename.patch
# Patch Sage to work with dependency Debian packages
# These won't change even if Debian and Sage use the same version
diff --git a/debian/patches/u2-looser-doctest-basename.patch b/debian/patches/u2-looser-doctest-basename.patch
new file mode 100644
index 0000000..fe33a15
--- /dev/null
+++ b/debian/patches/u2-looser-doctest-basename.patch
@@ -0,0 +1,20 @@
+Description: Make sage.doctest.sources.get_basename work in more situations
+ This lets you specify SAGE_SRC like /path/to/test/dir/../../src/dir, which
+ avoids post-install test failures in sage/doctest/test.py
+Author: Ximin Luo <infinity0 at debian.org>
+Forwarded: TODO
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/sage/doctest/sources.py
++++ b/sage/src/sage/doctest/sources.py
+@@ -84,8 +84,8 @@
+ root = os.path.dirname(path)
+ # If the file is in the sage library, we can use our knowledge of
+ # the directory structure
+- dev = SAGE_SRC
+- sp = os.path.join(SAGE_LOCAL, 'lib', 'python', 'site-packages')
++ dev = os.path.normpath(SAGE_SRC)
++ sp = os.path.normpath(os.path.join(SAGE_LOCAL, 'lib', 'python', 'site-packages'))
+ if path.startswith(dev):
+ # there will be a branch name
+ i = path.find(os.path.sep, len(dev))
--
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