From 70f229fb581abf78a4384435af404ea12947a4b1 Mon Sep 17 00:00:00 2001 From: "Amir Y. Perehodnik" Date: Wed, 14 Aug 2024 22:03:54 +0300 Subject: [PATCH] add pyinstaller spec file --- pyinst-compile.spec | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pyinst-compile.spec diff --git a/pyinst-compile.spec b/pyinst-compile.spec new file mode 100644 index 0000000..284f61c --- /dev/null +++ b/pyinst-compile.spec @@ -0,0 +1,34 @@ +# -*- mode: python ; coding: utf-8 -*- +import os +import site + +# Locate the site-packages directory +site_packages_path = next(p for p in site.getsitepackages() if 'site-packages' in p) + +# Path to the legacy_blocks.json file +legacy_blocks_path = os.path.join(site_packages_path, 'anvil', 'legacy_blocks.json') + +block_cipher = None + +a = Analysis(['arnis.py'], + pathex=['.'], + binaries=[], + datas=[(legacy_blocks_path, 'anvil')], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='arnis', + debug=False, + strip=False, + upx=True, + runtime_tmpdir=None, + console=True )