From cd5ed819895f798e08a25a306a1022eb9b64a668 Mon Sep 17 00:00:00 2001 From: kchason Date: Wed, 20 Mar 2024 14:18:33 -0400 Subject: [PATCH] Initial setup for case_validate.exe --- README.md | 23 +++++++++++++++++++++++ case_validate.spec | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 case_validate.spec diff --git a/README.md b/README.md index 3374566..0e439a9 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,29 @@ Some `make` targets are defined for this repository: * `download` - Download files sufficiently to run the unit tests offline. This will *not* include the ontology repositories tracked as submodules. Note if you do need to work offline, be aware touching the `setup.cfg` file in the project root directory, or `tests/requirements.txt`, will trigger a virtual environment rebuild. +## Windows Executables + +This repository supports building Windows executables with [PyInstaller](https://pyinstaller.org/en/stable/index.html). +This packages a Python executable along with the code for portability. + +```powershell +# Create the virtual environment (optional) +python3 -m venv venv + +# Activate the virtual environment (optional) +./venv/Scripts/activate . + +# Install PyInstaller and verify the version +pip install pyinstaller +pyinstaller --version + +# Build the executable with the .spec file +pyinstaller .\case_validate.spec + +# Confirm the build +.\dist\case_validate.exe -h +``` + ## Licensing This repository is licensed under the Apache 2.0 License. See [LICENSE](LICENSE). diff --git a/case_validate.spec b/case_validate.spec new file mode 100644 index 0000000..c2a856c --- /dev/null +++ b/case_validate.spec @@ -0,0 +1,37 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['case_utils\\case_validate\\__init__.py'], + pathex=[], + binaries=[], + datas=[('.\\case_utils\\ontology\\', '.\\case_utils\\ontology\\')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='case_validate', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +)