[sagemath] 01/01: Fix more graph paths

Ximin Luo infinity0 at debian.org
Sat Oct 15 10:36:06 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 341ab81e8b7cfb75f32549568f3728ce8e965aa2
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sat Oct 15 12:35:29 2016 +0200

    Fix more graph paths
---
 debian/patches/debian-paths.patch | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/debian/patches/debian-paths.patch b/debian/patches/debian-paths.patch
index 2828d18..a0d60da 100644
--- a/debian/patches/debian-paths.patch
+++ b/debian/patches/debian-paths.patch
@@ -244,3 +244,35 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
                                                 'Full'+str(dim)+'d', 'zzdb')
              info = self._data_basename + '.info'
              if not os.path.exists(info):
+--- a/sage/src/sage/databases/sql_db.py
++++ b/sage/src/sage/databases/sql_db.py
+@@ -242,7 +242,6 @@
+     skeleton = {}
+     cur = database.__connection__.cursor()
+     exe = cur.execute("SELECT name FROM sqlite_master WHERE TYPE='table'")
+-    from sage.env import SAGE_SHARE
+     for table in exe.fetchall():
+         skeleton[table[0]] = {}
+         exe1 = cur.execute("PRAGMA table_info(%s)"%table[0])
+@@ -257,7 +256,7 @@
+         for col in exe2.fetchall():
+             if col[1].find('sqlite') == -1:
+                 if database.__dblocation__ == \
+-                        os.path.join(SAGE_SHARE,'graphs','graphs.db'):
++                        os.path.join('/usr/share/sagemath/graphs','graphs.db'):
+                     name = col[1]
+                 else:
+                     name = col[1][len(table[0])+3:]
+--- a/sage/src/sage/graphs/graph_database.py
++++ b/sage/src/sage/graphs/graph_database.py
+@@ -54,9 +54,8 @@
+ from sage.rings.integer import Integer
+ from sqlite3 import dbapi2 as sqlite # if anyone would like to explain why dbapi2...
+ from sage.databases.sql_db import SQLDatabase, SQLQuery
+-from sage.env import SAGE_SHARE
+ from sage.graphs.graph import Graph
+-dblocation = os.path.join(SAGE_SHARE,'graphs','graphs.db')
++dblocation = os.path.join('/usr/share/sagemath/graphs','graphs.db')
+ 
+ def degseq_to_data(degree_sequence):
+     """

-- 
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