Skip to content

Commit

Permalink
fix building windows wheels properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowJonathan committed May 30, 2024
1 parent 600e2b4 commit 23810a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Core/ClientSMLSWIG/Python/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ clone.Append(CPPPATH = inc_path)
# GHA Runners. (python installations are handled by cibuildwheel)
#
# Omitting python's libraries is safe, as python itself injects its symbols when importing the library.
if (not env['ENSCONS_ACTIVE']) or os.name == 'nt':
if (not env['ENSCONS_ACTIVE']):
clone.Append(LIBPATH = lib_path, LIBS = pylib)
elif os.name == 'nt':
# For windows specifically, we need to give it a path to find 'python3.lib',
# without linking it against 'python3X' (with X being the minor version).
clone.Append(LIBPATH = lib_path)

if os.name == 'posix':
clone.Append(CPPFLAGS = Split('-Wno-unused -fno-strict-aliasing'))
Expand Down
5 changes: 4 additions & 1 deletion Core/ClientSMLSWIG/Python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ test-command = "SOAR_UNIT_TEST_BASE_DIR={project}/out/ python {project}/Core/Cli
test-skip = "cp38-macosx_*:arm64"

[tool.cibuildwheel.windows]
# For windows we need a slightly different command
# For windows, we need to include msvcp140.dll and vcruntime140_1.dll in the wheel.
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair --ignore-in-wheel -w {dest_dir} {wheel}"
# For windows we need a slightly different test command
test-command = """\
set SOAR_UNIT_TEST_BASE_DIR={project}/out/
python {project}/Core/ClientSMLSWIG/Python/TestPythonSML.py
Expand Down

0 comments on commit 23810a8

Please sign in to comment.