summaryrefslogtreecommitdiff
path: root/debian/pymindeps.py
diff options
context:
space:
mode:
Diffstat (limited to 'debian/pymindeps.py')
-rw-r--r--debian/pymindeps.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/debian/pymindeps.py b/debian/pymindeps.py
index 4fee74b..a5a1849 100644
--- a/debian/pymindeps.py
+++ b/debian/pymindeps.py
@@ -54,10 +54,10 @@ class mymf(modulefinder.ModuleFinder):
callee = m.__name__
if '.' in callee:
callee = callee[:callee.index('.')]
- #print "XXX last_caller", caller, "MOD", callee
+ #print("XXX last_caller", caller, "MOD", callee)
#self._depgraph.setdefault(self._last_caller.__name__,{})[r.__name__] = 1
- #if caller in ('pdb', 'doctest') or callee in ('pdb', 'doctest'):
- # print caller, "-->", callee
+ #if caller in ('pdb', 'doctest', 'importlib') or callee in ('pdb', 'doctest', 'importlib'):
+ # print(caller, "-->", callee)
if caller != callee:
self._depgraph.setdefault(caller,{})[callee] = 1
return m
@@ -106,7 +106,7 @@ def reduce_depgraph(dg):
# guarded imports, which don't need to be included in python-minimal
excluded_imports = {
- 'argparse': set(('gettext',)),
+ 'argparse': set(('gettext', 'shutil')),
'codecs': set(('encodings',)),
'collections': set(('cPickle', 'pickle', 'doctest')),
'compileall': set(('concurrent',)),
@@ -115,14 +115,17 @@ excluded_imports = {
'hashlib': set(('logging', '_hashlib')),
#'hashlib': set(('_hashlib', '_md5', '_sha', '_sha256','_sha512',)),
'heapq': set(('doctest',)),
+ 'importlib': set(('csv', 'email', 'zipfile')),
#'io': set(('_dummy_thread',)),
'logging': set(('multiprocessing',)),
'os': set(('nt', 'ntpath', 'os2', 'os2emxpath', 'mac', 'macpath',
'riscos', 'riscospath', 'riscosenviron')),
'optparse': set(('gettext',)),
+ 'pathlib': set(('urllib',)), # Windows only
'pickle': set(('argparse', 'doctest', 'pprint')),
'platform': set(('ctypes', 'plistlib', 'tempfile')),
'reprlib': set(('_dummy_thread',)),
+ 'shutil': set(('bz2','lzma', 'tarfile', 'zipfile')),
#'socket': set(('_ssl',)),
'_sitebuiltins': set(('pydoc',)),
'subprocess': set(('dummy_threading',)),
@@ -130,6 +133,7 @@ excluded_imports = {
'tempfile': set(('_dummy_thread', 'shutil')),
'functools': set(('typing',)),
'platform': set(('distutils','plistlib')),
+ 'zipfile': set(('bz2','lzma')),
}
def main(argv):