Skip to content

Commit

Permalink
224 make executable (#285)
Browse files Browse the repository at this point in the history
* Create env to build

* Make PyInstaller spec

* Working exe on py12

* Updated Pathfinder version support

* Add hatch env script
  • Loading branch information
kjy5 authored Jan 20, 2024
1 parent 6e210c7 commit 3591a0b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ to communicate with manipulators used in electrophysiology experiments.

**Supported Manipulators:**

| Manufacturer | Model |
|--------------|-------------------------------------------------------------------|
| Sensapex | <ul> <li>uMp-4</li> <li>uMp-3</li> </ul> |
| New Scale | <ul> <li>Pathfinder MPM Control</li> <li>M3-USB-3:1-EP</li> </ul> |
| Manufacturer | Model |
|--------------|---------------------------------------------------------------------------|
| Sensapex | <ul> <li>uMp-4</li> <li>uMp-3</li> </ul> |
| New Scale | <ul> <li>Pathfinder MPM Control v2.8.8+</li> <li>M3-USB-3:1-EP</li> </ul> |

Ephys Link is an open and extensible platform. It is designed to easily support integration with other manipulators.

Expand Down
43 changes: 43 additions & 0 deletions ephys_link.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['src\\ephys_link\\__main__.py'],
pathex=[],
binaries=[('src\\ephys_link\\resources', 'ephys_link\\resources')],
datas=[],
hiddenimports=['engineio.async_drivers.aiohttp', 'engineio.async_aiohttp'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='ephys_link',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='ephys_link',
)
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ dependencies = [
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/ephys_link tests}"

[tool.hatch.envs.exe]
python = "3.12"
dependencies = [
"pyinstaller==6.3.0",
]
[tool.hatch.envs.exe.scripts]
build = "pyinstaller.exe ephys_link.spec -y"

[tool.coverage.run]
source_pkgs = ["ephys_link", "tests"]
branch = true
Expand Down

0 comments on commit 3591a0b

Please sign in to comment.