Skip to content

Commit

Permalink
🩹 make sure to define Py_GIL_DISABLED on Windows for Python 3.13t
Browse files Browse the repository at this point in the history
Signed-off-by: burgholzer <[email protected]>
  • Loading branch information
burgholzer committed Sep 4, 2024
1 parent eb02e82 commit 66b69b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ if(BUILD_MQT_DDSIM_BINDINGS)
ON
CACHE BOOL "Prevent multiple searches for Python and instead cache the results.")

if(DISABLE_GIL)
message(STATUS "Disabling Python GIL")
add_compile_definitions(Py_GIL_DISABLED)
endif()

# top-level call to find Python
find_package(
Python 3.8 REQUIRED
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ BUILD_MQT_DDSIM_TESTS = "OFF"
BUILD_MQT_DDSIM_BINDINGS = "ON"
BUILD_MQT_DDSIM_CLI = "OFF"

[[tool.scikit-build.overrides]]
if.python-version = ">=3.13"
if.abi-flags = "t"
if.platform-system = "win32"
inherit.cmake.define = "append"
cmake.define.DISABLE_GIL = "1"


[tool.check-sdist]
sdist-only = ["src/mqt/ddsim/_version.py"]
Expand Down

0 comments on commit 66b69b8

Please sign in to comment.