Skip to content

Commit e9b2d5a

Browse files
committed
Complete package metadata and fix manylinux wheel tagging
Following Python packaging best practices (packaging.python.org): Package Metadata Additions: - Added authors and maintainers (Raul C. Sîmpetru, Renato Naville Watanabe) - Added license field (AGPL-3.0-or-later) - Added PyPI classifiers for better categorization: * Development Status :: 4 - Beta * Science/Research audience * Cross-platform support (Linux, macOS, Windows) * Python 3.12+ only * Scientific/Engineering topics - Added project.urls for homepage, docs, repository, issues, changelog - Added keywords for package discoverability Wheel Build Fixes: - Use auditwheel --exclude to mark MPI libs as external dependencies - Explicitly set --plat manylinux_2_17_x86_64 platform tag - Updated README with MPI installation requirements - Based on research of cibuildwheel best practices: * NEURON uses custom Docker containers * scikit-learn uses custom before_build scripts * auditwheel supports external dependency exclusion This ensures: 1. Wheels have proper manylinux tags for PyPI acceptance 2. Package metadata is complete and discoverable on PyPI 3. Users understand MPI is required as system dependency References: - https://packaging.python.org/en/latest/tutorials/packaging-projects/ - https://github.com/pypa/auditwheel - https://github.com/scikit-learn/scikit-learn
1 parent 64bdbb6 commit e9b2d5a

File tree

4 files changed

+66
-5
lines changed

4 files changed

+66
-5
lines changed

.github/workflows/build-wheels.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
# Install system dependencies before building (Linux)
3737
CIBW_BEFORE_ALL_LINUX: |
38-
yum install -y openmpi-devel || apt-get update && apt-get install -y libopenmpi-dev
38+
yum install -y openmpi-devel
3939
4040
# Install system dependencies before building (macOS)
4141
CIBW_BEFORE_ALL_MACOS: |
@@ -48,11 +48,21 @@ jobs:
4848
CIBW_BEFORE_BUILD_MACOS: |
4949
pip install neuron setuptools Cython numpy scipy
5050
51-
# Set manylinux image
51+
# Use manylinux2014 (manylinux_2_17)
5252
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
5353

54-
# Repair wheel to embed shared libraries (Linux only)
55-
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair -w {dest_dir} {wheel}"
54+
# Exclude MPI libraries from bundling (users must install system MPI)
55+
# This allows auditwheel to create valid manylinux wheels
56+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
57+
auditwheel repair -w {dest_dir} {wheel}
58+
--exclude libmpi.so.40
59+
--exclude libmpi.so.12
60+
--exclude libopen-pal.so.40
61+
--exclude libopen-rte.so.40
62+
--plat manylinux_2_17_x86_64
63+
64+
- name: Show built wheel names
65+
run: ls -lh wheelhouse/
5666

5767
- name: Upload wheels
5868
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
## [0.6.0] - 2025-12-16
1111

1212
### Added
13+
- **Package Metadata**: Complete PyPI metadata following Python packaging best practices
14+
- Added authors and maintainers information
15+
- Added license field (AGPL-3.0-or-later)
16+
- Added comprehensive classifiers for PyPI categorization
17+
- Added project URLs (homepage, documentation, repository, issues, changelog)
18+
- Added keywords for better package discoverability
1319
- **Automatic Build System**: Comprehensive automatic NMODL compilation during package build
1420
- New `setup.py` with custom `BuildWithNMODL` class that compiles NMODL files during wheel building
1521
- Automatic Cython extension compilation integrated into build process
@@ -18,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1824
- **CI/CD Workflow**: GitHub Actions workflow for automated wheel building and publishing
1925
- Uses `cibuildwheel` for PyPI-compatible manylinux wheels (Linux) and universal wheels (macOS)
2026
- Automatic wheel building for Linux (x86_64) and macOS (Intel) with pre-compiled NMODL mechanisms
27+
- Wheels built on manylinux2014 with proper `manylinux_2_17_x86_64` platform tags
28+
- MPI libraries marked as external dependencies (users install system MPI separately)
2129
- Multi-platform testing of built wheels before publishing
2230
- OIDC-based PyPI publishing (no API tokens needed)
2331
- Automated MPI/OpenMPI installation in CI for both Linux and macOS

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,19 @@ MyoGen is designed for algorithm validation, hypothesis-driven research, and edu
4242
**Prerequisites**: Python ≥3.12, Linux/Windows/macOS
4343

4444
> [!IMPORTANT]
45-
> **Windows users**: Install [NEURON 8.2.6](https://github.com/neuronsimulator/nrn/releases/download/8.2.6/nrn-8.2.6.w64-mingw-py-38-39-310-311-312-setup.exe) before installing MyoGen
45+
> **System Requirements**:
46+
> - **Linux/macOS**: OpenMPI or MPICH (install via package manager)
47+
> - **Windows**: [NEURON 8.2.6](https://github.com/neuronsimulator/nrn/releases/download/8.2.6/nrn-8.2.6.w64-mingw-py-38-39-310-311-312-setup.exe) required before installing MyoGen
48+
49+
```bash
50+
# Install MPI (Linux)
51+
sudo apt-get install libopenmpi-dev # Ubuntu/Debian
52+
# or
53+
sudo yum install openmpi-devel # RHEL/CentOS
54+
55+
# Install MPI (macOS)
56+
brew install open-mpi
57+
```
4658

4759
## From PyPI (recommended)
4860

pyproject.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ version = "0.6.0"
44
description = "Surface and Intramuscular EMG simulation toolkit"
55
readme = "README.md"
66
requires-python = ">=3.12"
7+
license = {text = "AGPL-3.0-or-later"}
8+
authors = [
9+
{name = "Raul C. Sîmpetru", email = "raul.simpetru@fau.de"},
10+
{name = "Renato Naville Watanabe", email = "renato.navillewatanabe@gmail.com"},
11+
]
12+
maintainers = [
13+
{name = "Raul C. Sîmpetru", email = "raul.simpetru@fau.de"},
14+
]
15+
keywords = ["EMG", "electromyography", "neuromuscular", "simulation", "motor-unit", "NEURON", "neuroscience"]
16+
classifiers = [
17+
"Development Status :: 4 - Beta",
18+
"Intended Audience :: Science/Research",
19+
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
20+
"Operating System :: POSIX :: Linux",
21+
"Operating System :: MacOS",
22+
"Operating System :: Microsoft :: Windows",
23+
"Programming Language :: Python :: 3",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3 :: Only",
26+
"Topic :: Scientific/Engineering",
27+
"Topic :: Scientific/Engineering :: Bio-Informatics",
28+
"Topic :: Scientific/Engineering :: Medical Science Apps.",
29+
]
30+
31+
[project.urls]
32+
Homepage = "https://nsquaredlab.github.io/MyoGen/"
33+
Documentation = "https://nsquaredlab.github.io/MyoGen/"
34+
Repository = "https://github.com/NsquaredLab/MyoGen"
35+
Issues = "https://github.com/NsquaredLab/MyoGen/issues"
36+
Changelog = "https://github.com/NsquaredLab/MyoGen/blob/main/CHANGELOG.md"
37+
738
dependencies = [
839
"beartype>=0.21.0",
940
"cython>=3.1.3",

0 commit comments

Comments
 (0)