Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Executables #161

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
37 changes: 37 additions & 0 deletions case_validate.spec
Original file line number Diff line number Diff line change
@@ -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,
)
Loading