[sagemath] 05/06: Check for Python modules directly from prunter.py (for new dependencies).
Tobias Hansen
thansen at moszumanska.debian.org
Sat Jul 9 16:22:39 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 8a9517674bed1f3fec64b58bf189f34a929a8b22
Author: Tobias Hansen <thansen at debian.org>
Date: Sat Jul 9 16:07:18 2016 +0000
Check for Python modules directly from prunter.py (for new dependencies).
---
debian/pruner/pruner.py.in | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/debian/pruner/pruner.py.in b/debian/pruner/pruner.py.in
index 91b3b5f..5c0dabd 100644
--- a/debian/pruner/pruner.py.in
+++ b/debian/pruner/pruner.py.in
@@ -5,6 +5,7 @@ import os
import codecs
import subprocess
import time
+import imp
system_installed_packages = 0
installed_dir = '@SAGE_ROOT@/local/var/lib/sage/installed'
@@ -170,6 +171,44 @@ dico = {
'zn_poly': @HAS_ZNPOLY@
}
+python_modules = [
+ 'alabaster',
+ 'babel',
+ 'flask',
+ 'flask_autoindex',
+ 'flask_babel',
+ 'flask_oldsessions',
+ 'flask_openid',
+ 'flask_silk',
+ 'imagesize',
+ 'itsdangerous',
+ 'pathlib2',
+ 'pytz',
+ 'snowballstemmer',
+ 'speaklater',
+ 'twisted',
+ 'werkzeug'
+]
+
+python_packages_to_modules = {
+ 'python_openid': 'openid',
+ 'zope_interface': 'zope/interface'
+}
+
+for p in python_modules:
+ try:
+ imp.find_module(p)
+ dico[p] = True
+ except ImportError:
+ dico[p] = False
+
+for p, m in python_packages_to_modules.iteritems():
+ try:
+ imp.find_module(m)
+ dico[p] = True
+ except ImportError:
+ dico[p] = False
+
# report missing standard packages too
for p in sage_standard_packages:
if p not in dico:
--
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