From b6e10c420958cf554c1953f30c4cfd9dcadebd1a Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Thu, 28 Sep 2023 17:25:49 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=83=D0=BF=D0=B0=D0=BA=D0=BE=D0=B2=D0=BA=D0=B0=20?= =?UTF-8?q?=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D0=BD=D1=8B=D1=85=20=D0=B1?= =?UTF-8?q?=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA=20=D0=B2=D0=BC?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B5=20=D1=81=20=D0=BF=D1=80=D0=BE=D0=B3?= =?UTF-8?q?=D1=80=D0=B0=D0=BC=D0=BC=D0=BE=D0=B9=20(Linux)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- statapp-onefile.spec | 18 ++++++++++++++++++ statapp.spec | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/statapp-onefile.spec b/statapp-onefile.spec index 8bf46a7..5161602 100644 --- a/statapp-onefile.spec +++ b/statapp-onefile.spec @@ -1,4 +1,15 @@ # -*- mode: python ; coding: utf-8 -*- +import sys +import typing +from pprint import pprint + +if typing.TYPE_CHECKING: + from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ # noqa: F401 + from PyInstaller.building.build_main import Analysis # noqa: F401 + from PyInstaller.building.datastruct import TOC, Target, Tree # noqa: F401 + from PyInstaller.building.osx import BUNDLE # noqa: F401 + from PyInstaller.building.splash import Splash # noqa: F401 + from PyInstaller.utils.hooks import copy_metadata datas = [('statapp/images/sticker.gif', 'images')] @@ -16,6 +27,13 @@ a = Analysis( excludes=[], noarchive=False, ) + +prev_binaries = set(a.binaries) +if sys.platform in ('linux', 'darwin'): + a.exclude_system_libraries(list_of_exceptions=[]) # glob expression +print('\n\nSTRIPPED SYSTEM LIBS') +pprint(sorted(set(prev_binaries) - set(a.binaries))) + pyz = PYZ(a.pure) exe = EXE( diff --git a/statapp.spec b/statapp.spec index 917e58e..e12d0eb 100644 --- a/statapp.spec +++ b/statapp.spec @@ -1,4 +1,15 @@ # -*- mode: python ; coding: utf-8 -*- +import sys +import typing +from pprint import pprint + +if typing.TYPE_CHECKING: + from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ # noqa: F401 + from PyInstaller.building.build_main import Analysis # noqa: F401 + from PyInstaller.building.datastruct import TOC, Target, Tree # noqa: F401 + from PyInstaller.building.osx import BUNDLE # noqa: F401 + from PyInstaller.building.splash import Splash # noqa: F401 + from PyInstaller.utils.hooks import copy_metadata datas = [('statapp/images/sticker.gif', 'images')] @@ -17,6 +28,13 @@ a = Analysis( excludes=[], noarchive=False, ) + +prev_binaries = set(a.binaries) +if sys.platform in ('linux', 'darwin'): + a.exclude_system_libraries(list_of_exceptions=[]) # glob expression +print('\n\nSTRIPPED SYSTEM LIBS') +pprint(sorted(set(prev_binaries) - set(a.binaries))) + pyz = PYZ(a.pure) exe = EXE(