Skip to content

Commit

Permalink
Python Bindings: use configurable "python" choices
Browse files Browse the repository at this point in the history
Replaces hardcoded "python" with PYTHON_EXE developed in ./configure

Requires distclean.

Closes: #13546

Signed-off-by: Bill Meek <billmeek@mythtv.org>
  • Loading branch information
rcrdnalor authored and Bill Meek committed Jan 6, 2020
1 parent bdfb769 commit 186e24a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions mythtv/configure
Expand Up @@ -7656,6 +7656,7 @@ cat > $TMPH <<EOF
#define JDK_HOME "$JDK_HOME"
#define JAVA_ARCH "$java_arch"
#define IMAGE_ALIGN $image_align
#define PYTHON_EXE "${python}"
EOF

# Code only checks whether HAVE_BDJ_J2ME is defined, not what value
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythbackend/mainserver.cpp
Expand Up @@ -6948,7 +6948,7 @@ void MainServer::HandleMusicGetLyricGrabbers(const QStringList &/*slist*/, Playb
for (int x = 0; x < scripts.count(); x++)
{
QProcess p;
p.start(QString("python %1 -v").arg(scripts.at(x)));
p.start(QString("%1 %2 -v").arg(PYTHON_EXE).arg(scripts.at(x)));
p.waitForFinished(-1);
QString result = p.readAllStandardOutput();

Expand Down
7 changes: 4 additions & 3 deletions mythtv/programs/mythutil/musicmetautils.cpp
Expand Up @@ -4,6 +4,7 @@
#include <QDomDocument>

// libmyth* headers
#include "mythconfig.h"
#include "exitcodes.h"
#include "mythlogging.h"
#include "storagegroup.h"
Expand Down Expand Up @@ -491,7 +492,7 @@ static int FindLyrics(const MythUtilCommandLineParser &cmdline)
for (int x = 0; x < scripts.count(); x++)
{
QProcess p;
p.start(QString("python %1 -v").arg(scripts.at(x)));
p.start(QString("%1 %2 -v").arg(PYTHON_EXE).arg(scripts.at(x)));
p.waitForFinished(-1);
QString result = p.readAllStandardOutput();

Expand Down Expand Up @@ -535,8 +536,8 @@ static int FindLyrics(const MythUtilCommandLineParser &cmdline)
gCoreContext->SendMessage(QString("MUSIC_LYRICS_STATUS %1 %2").arg(songID).arg(statusMessage));

QProcess p;
p.start(QString("python %1 --artist=\"%2\" --album=\"%3\" --title=\"%4\" --filename=\"%5\"")
.arg(grabber.m_filename).arg(artist).arg(album).arg(title).arg(filename));
p.start(QString("%1 %2 --artist=\"%3\" --album=\"%4\" --title=\"%5\" --filename=\"%6\"")
.arg(PYTHON_EXE).arg(grabber.m_filename).arg(artist).arg(album).arg(title).arg(filename));
p.waitForFinished(-1);
QString result = p.readAllStandardOutput();

Expand Down

0 comments on commit 186e24a

Please sign in to comment.