Skip to content

Commit a66b551

Browse files
[Python] Bundle FESAPI DLL import library into Windows wheel
Windows wheel CI: copy generated .lib files from fesapi-install/lib into the Release build folder so they are available during wheel repair. Update the CIBW_REPAIR_WHEEL_COMMAND_WINDOWS to include --include-imports for delvewheel (keeping --namespace-pkg) so imported DLLs are bundled into the repaired wheel.
1 parent 68701a9 commit a66b551

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/github-actions.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ jobs:
152152
cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install ${{ github.workspace }} &&
153153
cmake --build . --config Release -j2 &&
154154
cmake --build . --config Release --target INSTALL &&
155+
copy ${{ runner.temp }}/fesapi-install/lib/*.lib ${{ runner.temp }}\fesapi-build\Release &&
155156
pip install delvewheel
156157
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
157-
delvewheel repair --add-path ${{ runner.temp }}\fesapi-build\Release --namespace-pkg fesapi -w {dest_dir} {wheel}
158+
delvewheel repair --add-path ${{ runner.temp }}\fesapi-build\Release --include-imports --namespace-pkg fesapi -w {dest_dir} {wheel}
158159
CIBW_TEST_COMMAND: python ${{github.workspace}}\python\example\example.py
159160
with:
160161
package-dir: ./python

python/example/fesapi.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@
132132
},
133133
{
134134
"cell_type": "code",
135+
"execution_count": null,
135136
"id": "b5d289e6-c699-4d88-a870-3dae2baf14ee",
136137
"metadata": {},
138+
"outputs": [],
137139
"source": [
138-
"# Create an EPC Document in the current folder nad named TestingFesapiWithPython.epc\n",
140+
"# Create an EPC Document named TestingFesapiWithPython.epc in the current folder\n",
139141
"epc_file = fesapi.EpcDocument(file_name_without_extension + \".epc\")\n",
140142
"epc_file.serializeFrom(repo)"
141143
]

0 commit comments

Comments
 (0)