Skip to content

Commit fc40c71

Browse files
committed
Fix: Enhance Windows installation with NEURON DLL detection and add CSV data files to package
1 parent 02d26c0 commit fc40c71

5 files changed

Lines changed: 37 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.6.10] - 2025-12-16
11+
12+
### Fixed
13+
- **Windows Installation**: Added NEURON DLL detection in setup.py
14+
- Verifies NEURON can be imported before compilation
15+
- Provides clear PATH configuration instructions if DLLs not found
16+
- Resolves "DLL load failed while importing hoc" error
17+
- **Package Data**: Added CSV files to package distribution
18+
- Includes voronoi_pi1e5.csv and other data files
19+
- Added to both MANIFEST.in and pyproject.toml package-data
20+
1021
## [0.6.9] - 2025-12-16
1122

1223
### Fixed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ recursive-include myogen *.pxd
2020

2121
# Include YAML configuration files
2222
recursive-include myogen *.yaml
23+
24+
# Include CSV data files
25+
recursive-include myogen *.csv

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "MyoGen"
3-
version = "0.6.9"
3+
version = "0.6.10"
44
description = "Modular and extensible neuromuscular simulation framework for generating physiologically grounded motor-unit activity, muscle force, and EMG signals (surface and intramuscular)"
55
readme = "README.md"
66
requires-python = ">=3.12"
@@ -114,6 +114,7 @@ myogen = [
114114
"**/*.so",
115115
"**/*.o",
116116
"**/*.yaml",
117+
"**/*.csv",
117118
"**/x86_64/*",
118119
"**/x86_64/.libs/*",
119120
"**/aarch64/*",

setup.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@ def compile_nmodl(self):
6868

6969
def _compile_nmodl_windows(self, nmodl_path):
7070
"""Compile NMODL on Windows."""
71+
# First, verify NEURON can be imported (checks DLLs are accessible)
72+
try:
73+
import neuron
74+
from neuron import h
75+
except ImportError as e:
76+
raise ImportError(
77+
"\n" + "="*70 + "\n"
78+
"NEURON import failed - DLL not found\n"
79+
"="*70 + "\n\n"
80+
"NEURON is installed but cannot load DLLs.\n\n"
81+
"Please add NEURON's bin directory to your PATH:\n"
82+
"1. Search for 'Environment Variables' in Windows\n"
83+
"2. Edit 'Path' in System Variables\n"
84+
"3. Add: C:\\nrn\\bin (or your NEURON install location)\n"
85+
"4. Restart your terminal/IDE\n"
86+
"5. Retry: pip install myogen\n\n"
87+
f"Original error: {e}\n"
88+
"="*70 + "\n"
89+
) from e
90+
7191
# Try to find NEURON installation
7292
neuron_homes = [
7393
Path(os.environ.get("NEURONHOME", "")),

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)