Notes for linux packagers: removable files - olivierkes/manuskript GitHub Wiki

Removable files

One issue with PyInstaller, it seems, is that unnecessary files are included. The creator of Anki told me (@olivierkes) that one of the difficulties was to find what libraries to remove.

While trying to find the cause of the annoying accentuated characters bug in Linux (see for example issue #207), I realized that manuskript could still be run even if all the following files are removed:

(tested on Ubuntu 16.04.3 LTS xenial with manuskript-0.5.0-linux64.zip).

Libraries in root folder

_bz2.so
_codecs_cn.so
_codecs_hk.so
_codecs_iso2022.so
_codecs_jp.so
_codecs_kr.so
_codecs_tw.so
_ctypes.so
_hashlib.so
_json.so
libatk-1.0.so.0
libavahi-client.so.3
libavahi-common.so.3
libbz2.so.1.0
libcairo.so.2
libcom_err.so.2
libcrypto.so.1.0.0
libcups.so.2
libdatrie.so.1
libdbus-1.so.3
libEGL.so.1
libexpat.so.1
libexslt.so.0
libffi.so.6
libfontconfig.so.1
libfreetype.so.6
libgbm.so.1
libgcc_s.so.1
libgcrypt.so.20
libgdk_pixbuf-2.0.so.0
libgdk-x11-2.0.so.0
libgio-2.0.so.0
libglapi.so.0
libglib-2.0.so.0
libgmodule-2.0.so.0
libgmp.so.10
libgnutls-deb0.so.28
libgobject-2.0.so.0
libgpg-error.so.0
libgraphite2.so.3
libgssapi_krb5.so.2
libgstapp-0.10.so.0
libgstbase-0.10.so.0
libgstinterfaces-0.10.so.0
libgstpbutils-0.10.so.0
libgstreamer-0.10.so.0
libgstvideo-0.10.so.0
libgthread-2.0.so.0
libgtk-x11-2.0.so.0
libharfbuzz.so.0
libhogweed.so.2
libICE.so.6
libicudata.so.52
libicui18n.so.52
libicuuc.so.52
libjpeg.so.62
libk5crypto.so.3
libkeyutils.so.1
libkrb5.so.3
libkrb5support.so.0
liblzma.so.5
libmtdev.so.1
libnettle.so.4
liborc-0.4.so.0
libp11-kit.so.0
libpango-1.0.so.0
libpangocairo-1.0.so.0
libpangoft2-1.0.so.0
libpcre.so.3
libpixman-1.so.0
libpng12.so.0
libQt5Network.so.5
libQt5OpenGL.so.5
libQt5PrintSupport.so.5
libQt5Qml.so.5
libQt5Quick.so.5
libQt5Sql.so.5
libQt5WebKit.so.5
libQt5WebKitWidgets.so.5
libreadline.so.6
libselinux.so.1
libSM.so.6
libsqlite3.so.0
libssl.so.1.0.0
libstdc++.so.6
libtasn1.so.6
libthai.so.0
libtinfo.so.5
libudev.so.1
libuuid.so.1
libwayland-client.so.0
libwayland-server.so.0
libwebp.so.5
libX11.so.6
libX11-xcb.so.1
libXau.so.6
libxcb-glx.so.0
libxcb-icccm.so.4
libxcb-image.so.0
libxcb-keysyms.so.1
libxcb-present.so.0
libxcb-randr.so.0
libxcb-render.so.0
libxcb-render-util.so.0
libxcb-shape.so.0
libxcb-shm.so.0
libxcb-sync.so.1
libxcb-util.so.0
libxcb-xfixes.so.0
libxcb-xkb.so.1
libXcomposite.so.1
libXcursor.so.1
libXdamage.so.1
libXdmcp.so.6
libXext.so.6
libXfixes.so.3
libXinerama.so.1
libXi.so.6
libxkbcommon.so.0
libxkbcommon-x11.so.0
libxml2.so.2
libXrandr.so.2
libXrender.so.1
libxshmfence.so.1
libxslt.so.1
libXxf86vm.so.1
libz.so.1
_lzma.so
mmap.so
_multibytecodec.so
_multiprocessing.so
_opcode.so
parser.so
PyQt5.QtNetwork.so
PyQt5.QtPrintSupport.so
PyQt5.QtWebKit.so
PyQt5.QtWebKitWidgets.so
readline.so
resource.so
_ssl.so
termios.so
  • Haven't checked all the functionalities, but most of manuskript works.
  • Notable exception: QtWebEngine / QtWebKit is disabled. Even when adding all the PyQt* and libQt5*.
  • Removing all of that, the accentuated characters bug is still present.

In other terms, only those are necessary:

base_library.zip
libpython3.4m.so.1.0
libQt5Core.so.5
libQt5DBus.so.5
libQt5Gui.so.5
libQt5Svg.so.5
libQt5Widgets.so.5
lxml.etree.so
manuskript
PyQt5.QtCore.so
PyQt5.QtGui.so
PyQt5.Qt.so
PyQt5.QtWidgets.so
sip.so    

In qt5_plugins

Can be removed:

t5_plugins/platforms/libqoffscreen.so
qt5_plugins/platforms/libqlinuxfb.so
qt5_plugins/platforms/libqminimal.so
qt5_plugins/platforms/libqkms.so
qt5_plugins/platforms/libqminimalegl.so
qt5_plugins/platforms/libqeglfs.so
qt5_plugins/accessible/*
qt5_plugins/imageformats/*
qt5_plugins/bearer/*
qt5_plugins/printsupport/*
qt5_plugins/platformthemes/*
  • All those files are not necessary to manuskript
  • Accentuated bug still present

In base_library.zip

  • encodings: We can remove most of the encodings in encodings, leaving __init__, aliases, latin_1, utf_8. Bug still present.

  • Others: None of the others files can be removed, except collections/abc.pyc and maybe collections.__main__.pyc as well as _bootlocale.pyc.