[mythtv-commits] Ticket #13643: MacOS Python2.6 hard code breaks python bindings / metadatalookup

MythTV noreply at mythtv.org
Mon Jul 6 16:45:58 UTC 2020


#13643: MacOS Python2.6 hard code breaks python bindings / metadatalookup
------------------------------+--------------------------------
 Reporter:  John Hoyt         |          Owner:  (none)
     Type:  Patch - Bug Fix   |         Status:  infoneeded_new
 Priority:  minor             |      Milestone:  31.1
Component:  MythTV - General  |        Version:  Unspecified
 Severity:  medium            |     Resolution:
 Keywords:  MacOS Python      |  Ticket locked:  0
------------------------------+--------------------------------
Changes (by Bill Meek):

 * status:  new => infoneeded_new


Comment:

 John,

 I see in compileMythfrontendAnsible.zsh: --python=/opt/local/bin/python3.8

 That ''should'' end up in libs/libmythbase/mythconfig.h as:
 #define PYTHON_EXE "/opt/local/bin/python3.8"

 Please test this, which removes the leading path info:
 {{{
 diff --git a/mythtv/programs/mythbackend/main.cpp
 b/mythtv/programs/mythbackend/main.cpp
 index 7cf7f5b644..1a6233a7ba 100644
 --- a/mythtv/programs/mythbackend/main.cpp
 +++ b/mythtv/programs/mythbackend/main.cpp
 @@ -94,10 +94,13 @@ int main(int argc, char **argv)
      QCoreApplication::setApplicationName(MYTH_APPNAME_MYTHBACKEND);

  #ifdef Q_OS_MAC
 +    QFileInfo fi(PYTHON_EXE);
 +    QString python_executable = fi.fileName();
      QString path = QCoreApplication::applicationDirPath();
      setenv("PYTHONPATH",
 -           QString("%1/../Resources/lib/python2.6/site-packages:%2")
 +           QString("%1/../Resources/lib/%2/site-packages:%3")
             .arg(path)
 +           .arg(python_executable)
 .arg(QProcessEnvironment::systemEnvironment().value("PYTHONPATH"))
             .toUtf8().constData(), 1);
  #endif
 }}}

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13643#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list