OLD | NEW |
1 # PyInstaller spec, run "pyinstaller runserver.spec" from repository root to bui
ld | 1 # PyInstaller spec, run "pyinstaller runserver.spec" from repository root to bui
ld |
2 | 2 |
3 # Hidden imports are supposed to be analyzed recursively. However, due to | 3 # Hidden imports are supposed to be analyzed recursively. However, due to |
4 # a bug in PyInstaller imports from inside hidden modules aren't considered. | 4 # a bug in PyInstaller imports from inside hidden modules aren't considered. |
5 # https://github.com/pyinstaller/pyinstaller/issues/1086 | 5 # https://github.com/pyinstaller/pyinstaller/issues/1086 |
6 def AnalysisWithHiddenImportsWorkaround(scripts, **kwargs): | 6 def AnalysisWithHiddenImportsWorkaround(scripts, **kwargs): |
7 import os | 7 import os |
8 | 8 |
9 filename = os.path.join(WORKPATH, '_hidden_imports.py') | 9 filename = os.path.join(WORKPATH, '_hidden_imports.py') |
10 with open(filename, 'wb') as file: | 10 with open(filename, 'wb') as file: |
11 for module in kwargs.pop('hiddenimports'): | 11 for module in kwargs.pop('hiddenimports'): |
12 print >>file, 'import ' + module | 12 print >>file, 'import ' + module |
13 | 13 |
14 a = Analysis([filename] + scripts, **kwargs) | 14 a = Analysis([filename] + scripts, **kwargs) |
15 a.scripts -= [('_hidden_imports', None, None)] | 15 a.scripts -= [('_hidden_imports', None, None)] |
16 return a | 16 return a |
17 | 17 |
18 a = AnalysisWithHiddenImportsWorkaround( | 18 a = AnalysisWithHiddenImportsWorkaround( |
19 ['cms/bin/test_server.py'], | 19 ['cms/bin/test_server.py'], |
20 pathex=['.'], | 20 pathex=['.'], |
21 hiddenimports=[ | 21 hiddenimports=[ |
| 22 'markdown.extensions.extra', |
| 23 'markdown.extensions.smart_strong', |
| 24 'markdown.extensions.fenced_code', |
| 25 'markdown.extensions.footnotes', |
22 'markdown.extensions.attr_list', | 26 'markdown.extensions.attr_list', |
| 27 'markdown.extensions.def_list', |
| 28 'markdown.extensions.tables', |
| 29 'markdown.extensions.abbr', |
23 | 30 |
24 # Used by globals/get_browser_versions.py in web.adblockplus.org | 31 # Used by globals/get_browser_versions.py in web.adblockplus.org |
25 'xml.dom.minidom', | 32 'xml.dom.minidom', |
26 ], | 33 ], |
27 excludes=[ | 34 excludes=[ |
28 'distutils', | 35 'distutils', |
29 'doctest', | 36 'doctest', |
30 'werkzeug', | 37 'werkzeug', |
31 | 38 |
32 # Mac-specific | 39 # Mac-specific |
(...skipping 10 matching lines...) Expand all Loading... |
43 a.scripts, | 50 a.scripts, |
44 a.binaries, | 51 a.binaries, |
45 a.zipfiles, | 52 a.zipfiles, |
46 a.datas, | 53 a.datas, |
47 name='runserver', | 54 name='runserver', |
48 debug=False, | 55 debug=False, |
49 strip=None, | 56 strip=None, |
50 upx=False, | 57 upx=False, |
51 console=True | 58 console=True |
52 ) | 59 ) |
OLD | NEW |