distutils.utils.get_platform() fails
#1
I'm writing a Kodi / XBMC (want it to work on Gotham as well) video addon that uses some 3rd party python code. That 3rd party code invokes distutils.util.get_platform(), which fails because get_platform() invokes distutils.sysconfig.get_makefile_filename(), which looks for .../config/Makefile in the embedded python2.6 directory. (actually it fails because of its subsequent attempt to read and parse said makefile)

The specific failure message is:
Quote:DistutilsPlatformError: invalid Python installation: unable to open /Users/Jay/Applications/XBMC.app/Contents/Libraries/lib/python2.6/config/Makefile

My development platform is a Mac, but I expect this addon to be applicable to all platforms. I'm looking for a generic Kodi/Python solution, hopefully nothing platform specific. I'm doing my development using XBMC Gotham.

Here's the traceback presented by Eclipse:
Code:
from distutils.util import get_platform
get_platform()
Traceback (most recent call last):
  File "/Users/Jay/.local/lib/python2.6/site-packages/pysrc/pydevd_comm.py", line 1032, in doIt
    result = pydevd_vars.evaluateExpression(self.thread_id, self.frame_id, self.expression, self.doExec)
  File "/Users/Jay/.local/lib/python2.6/site-packages/pysrc/pydevd_vars.py", line 308, in evaluateExpression
    result = eval(compiled, updated_globals, frame.f_locals)
  File "<string>", line 1, in <module>
  File "/Users/Shared/jenkins/workspace/XBMC-OSX-64/tools/depends/xbmc-depends/macosx10.8_x86_64-target/lib/python2.6/distutils/util.py", line 98, in get_platform
  File "/Users/Shared/jenkins/workspace/XBMC-OSX-64/tools/depends/xbmc-depends/macosx10.8_x86_64-target/lib/python2.6/distutils/sysconfig.py", line 521, in get_config_vars
  File "/Users/Shared/jenkins/workspace/XBMC-OSX-64/tools/depends/xbmc-depends/macosx10.8_x86_64-target/lib/python2.6/distutils/sysconfig.py", line 378, in _init_posix
DistutilsPlatformError: invalid Python installation:...

How is distutils.util.get_platform() ever expected to be used by Kodi/XBMC addons? Am I "doing it wrong"?

Regards,

-- Jay
Reply

Logout Mark Read Team Forum Stats Members Help
distutils.utils.get_platform() fails0