I am using PyInstaller to build an windows exe distributable package for a Kivy application where docutils.rst is being used. When setting console = False in the PyInstaller .spec file a virus is reported. When console = True, everything runs smoothly. When excluding docutils in the package, no virus is reported at all but then I am missing the specific docutils functionality.
Unfortunately the PyInstaller development community does not want to resolve these issues anymore and direct you to the virus software vendor.... (see: https://github.com/pyinstaller/pyinstaller/issues?q=is%3Aissue+virus+is%3Aclosed). Of course this is practically impossible when developing an application for a large diverse enterprise community.
Question 1: Does anybody know how to disable the console python console in an executable?
Otherwise I should find another direction to build a package. For example: How to compile python script to binary executable
Question 2: what do you think is the best option to move into for a package based on: python + kivy + multiprocessing + docutils.rst parser ?
For the sake of completeness, I have added my actual PyInstaller spec file:
-- mode: python --
import os
from os.path import join
from kivy import kivy_data_dir
from kivy.deps import sdl2, glew
from kivy.tools.packaging import pyinstaller_hooks as hooks
block_cipher = None
kivy_deps_all = hooks.get_deps_all()
kivy_factory_modules = hooks.get_factory_modules()
datas = [
(join('common', '*.ini'), 'common'),
(join('common', '*.ttf'), 'common')
]
# list of modules to exclude from analysis
excludes = ['Tkinter', '_tkinter', 'twisted', 'pygments']
# list of hiddenimports
hiddenimports = kivy_deps_all['hiddenimports'] + kivy_factory_modules
hiddenimports += ['starmeter']
# binary data
sdl2_bin_tocs = [Tree(p) for p in sdl2.dep_bins]
glew_bin_tocs = [Tree(p) for p in glew.dep_bins]
bin_tocs = sdl2_bin_tocs + glew_bin_tocs
# assets
kivy_assets_toc = Tree(kivy_data_dir, prefix=join('kivy_install', 'data'))
source_assets_toc = Tree('images', prefix='images')
assets_toc = [kivy_assets_toc, source_assets_toc]
tocs = bin_tocs + assets_toc
a = Analysis(['wflmain.py'],
pathex=[os.getcwd()],
binaries=None,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
runtime_hooks=[],
excludes=excludes,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe1 = EXE(pyz,
a.scripts,
name='sgc',
exclude_binaries=True,
icon=join('images', 'sgc.ico'),
debug=False,
strip=False,
upx=True,
console=False)
coll = COLLECT(exe1,
a.binaries,
a.zipfiles,
a.datas,
*tocs,
strip=False,
upx=True,
name='sgc')