Skip to content

Commit 0a8a5a2

Browse files
committed
1. BUILD_SHARED_LIBS=OFF will prevent zlib from creating its problematic shared library target
2. zlib will only build zlibstatic (which doesn't have resource compilation issues) 3. pyhelios_shared will still be explicitly created as a shared library because it's defined as SHARED in the CMakeLists.txt 4. All dependencies will be statically linked into the PyHelios DLL Add pyyaml as dependency in requirements.txt
1 parent ae0f200 commit 0a8a5a2

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

.github/workflows/pytest-linux.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
- name: Install build dependencies only
3131
run: |
3232
python -m pip install --upgrade pip
33-
pip install pyyaml
3433
3534
- name: Build native libraries
3635
run: |

.github/workflows/pytest-macos.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- name: Install build dependencies only
2929
run: |
3030
python -m pip install --upgrade pip
31-
pip install pyyaml
3231
3332
- name: Build native libraries
3433
run: |

.github/workflows/pytest-windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
- name: Install build dependencies only
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install pyyaml
3130
3231
- name: Build native libraries
3332
run: |

build_scripts/build_helios.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -506,16 +506,16 @@ def run_cmake_configure(self, additional_args: Optional[List[str]] = None) -> No
506506
cmake_cmd.extend(additional_args)
507507

508508
# Add PyHelios-specific options
509-
cmake_cmd.extend([
510-
'-DBUILD_SHARED_LIBS=ON', # Build as shared library
511-
])
512-
513-
# Windows-specific workaround for zlib resource compilation issue
514-
# The RC compiler fails on win32/zlib1.rc due to C syntax in included headers
515-
# Disable resource compilation by not setting CMAKE_RC_COMPILER
516509
if self.platform_name == 'Windows':
510+
# Windows-specific workaround for zlib resource compilation issue
511+
# The RC compiler fails on win32/zlib1.rc due to C syntax in included headers
512+
# Force static builds to avoid zlib RC issues, but manually create PyHelios shared lib
513+
cmake_cmd.extend([
514+
'-DBUILD_SHARED_LIBS=OFF', # Force static builds to avoid zlib RC errors
515+
])
516+
else:
517517
cmake_cmd.extend([
518-
'-DCMAKE_RC_COMPILER=', # Disable resource compiler to avoid RC1106 errors
518+
'-DBUILD_SHARED_LIBS=ON', # Build as shared library on non-Windows
519519
])
520520

521521
print(f"Running CMake configure: {' '.join(cmake_cmd)}")

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
numpy>=1.19.0
1+
numpy>=1.19.0
2+
pyyaml>=5.0.0

0 commit comments

Comments
 (0)