File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -79,3 +79,4 @@ tests/unit_tests/coverage*
79
79
parts
80
80
prime
81
81
stage
82
+ 3rdparty /python *
Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ win32* {
4
4
QMAKE_LIBS += -LC: \ Python37-x64\libs -lpython37
5
5
INCLUDEPATH += C: \ Python37-x64\include\
6
6
} else {
7
- PYTHON_CONFIG = python3-config
7
+ unix :macx {
8
+ PYTHON_CONFIG = $$PWD /python-3/bin/python3-config
9
+ } else {
10
+ PYTHON_CONFIG = python3-config
11
+ }
8
12
QMAKE_LIBS += $$system ($$PYTHON_CONFIG --ldflags --libs )
9
13
QMAKE_CXXFLAGS += $$system ($$PYTHON_CONFIG --includes )
10
14
}
Original file line number Diff line number Diff line change 1
1
#include " app.h"
2
2
3
3
#include < qpython.h>
4
+ #include < pythonlib_loader.h>
4
5
#include < qredisclient/redisclient.h>
5
6
#include < QMessageBox>
6
7
#include < QNetworkProxyFactory>
@@ -226,10 +227,12 @@ void Application::initUpdater() {
226
227
}
227
228
228
229
void Application::initPython () {
230
+ #ifdef Q_OS_MACOS
231
+ PythonLibLoader::extractPythonLibrary ();
232
+ #endif
229
233
m_python = QSharedPointer<QPython>(new QPython (this , 1 , 5 ));
230
234
m_python->addImportPath (" qrc:/python/" );
231
- m_python->addImportPath (applicationDirPath ());
232
- qDebug () << applicationDirPath ();
235
+ m_python->addImportPath (applicationDirPath ());
233
236
}
234
237
235
238
void Application::installTranslator () {
You can’t perform that action at this time.
0 commit comments