Skip to content

Commit

Permalink
Py_SetPath removed from Python 3.13. We should upgrade to use PyConfi…
Browse files Browse the repository at this point in the history
…g, but too late in the release cycle
  • Loading branch information
jmarrec committed Nov 7, 2024
1 parent 6eb299b commit 998e13e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python/engine/PythonEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
# pragma GCC diagnostic pop
#endif

// >= 3.13.0
// #if PY_VERSION_HEX >= 0x30d0000
#if PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 12)
extern "C"
{
// These functions was removed from Python 3.13 API but are still exported
// for the stable ABI. Until we upgrade to PyConfig, just keep using it
extern void Py_SetPath(const wchar_t* path);
}
#endif

namespace openstudio {

void addToPythonPath(const openstudio::path& includePath) {
Expand Down

0 comments on commit 998e13e

Please sign in to comment.