Skip to content

Commit

Permalink
Fixed Python dynamic API under Linux & improved Python autodiscovery
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelsalawa committed Dec 2, 2024
1 parent fe03189 commit 1855e70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Plugins/ScriptingPython/dynamicpythonapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extern PyObject* PyFrame_GetLocals(PyFrameObject*);
PYAPI_METHOD(Py_IncRef) \
PYAPI_METHOD(Py_Initialize) \
PYAPI_METHOD(Py_NewInterpreter) \
PYAPI_METHOD(PyThreadState_GetFrame) \
PYAPI_METHOD(PyBool_FromLong) \
PYAPI_METHOD(PyByteArray_AsString) \
PYAPI_METHOD(PyByteArray_Size) \
Expand Down
2 changes: 1 addition & 1 deletion Plugins/ScriptingPython/scriptingpython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ QStringList ScriptingPython::discoverLibraries() const
{"/Library/Frameworks/Python.framework/Versions/"}, {"*"}, {"/Python"}
#elif defined(Q_OS_UNIX)
QStringList({"", "/usr", "/usr/local", "/usr/pkg"}) + dirNames(pathEnv),
{"/lib/", "/lib64/"}, {"libpython*.so*"}
{"/lib/", "/lib64/", "/lib/x86_64-linux-gnu/", "/lib64/x86_64-linux-gnu/", "/lib/x86-linux-gnu/"}, {"libpython*.so*"}
#elif defined(Q_OS_WINDOWS)
QStringList({QDir::homePath() + "/AppData/Local/Programs/Python"}) + pathEnv,
{"", "/bin", "/lib"}, {"*python*.dll"}
Expand Down

0 comments on commit 1855e70

Please sign in to comment.