[mythtv-users] 0.25 Metadata v. Mac OS X
Craig Treleaven
ctreleaven at cogeco.ca
Fri Mar 23 21:29:03 UTC 2012
At 2:35 PM -0400 3/23/12, Raymond Wagner wrote:
>On 3/23/2012 14:22, Raymond Wagner wrote:
>> On 3/23/2012 11:25, Craig Treleaven wrote:
>>> C'mon you Python folks--can you lend us a hand?;)
>> The Python bindings just use the standard distutils library to describe
>> its components to Python, and let Python install the bindings where ever
>> it wants. If those mechanisms do not work on OSX, that is an upstream
>> problem for Python to resolve, or at least not something I can do
>> anything about not having an OSX machine to test on.
>
>The bindings are just installed through that
>mythtv/bindings/python/setup.py script. You run "python setup.py build"
>to tokenize them in a temporary build directory for faster loading. You
>run "python setup.py install" to install them to where ever Python
>stores its libraries on OSX. On Linux, that is
>/usr/local/lib/python2.X/site-packages/.
>
>If you are just installing directly, you may be able to get away with
>just running the above command, or more correctly letting it run through
>the bundled Makefile with "make install", however doing that may cause
>problems if you supply a --prefix during configure. If you are trying
>to instead bundle the bindings within that redistributable .app package,
>you are going to want to just build (tokenize) them, and then you're on
>your own how to move those files into the app, and afterwards how to let
>Python know how to find those files stored in the app.
Hi Raymond:
I know you've got lots on your plate--I was hoping that a Mac+Python
person would step forward. (I'm certainly not that person! ;)
I would bet dollars-to-donuts that there is some relatively
straightforward way to get the bindings to work on OS X. There is
lots of cross platform Python software that works. I'm inclined to
think that osx-packager.pl isn't doing something that it ought to,
that's all.
On OS X, there is no '/usr/local/lib/python2.X'. There is
'/usr/lib/python2.x' but it is a link to the OS X system library, as
below.
$ ls -al /usr/lib/python2.6
lrwxr-xr-x 1 root wheel 75 7 Oct 17:41 /usr/lib/python2.6 ->
../../System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
The latter directory holds a ton of stuff (*.py, *.pyc, and *.pyo)
and appears to have Apple-distributed components as well as stuff I
installed (using easy_install) like JSON and XML. All the files are
owned by root. If I get brave, I'll plop the
'build/lib/python2.6/site-packages/MythTV' directory into there and
see what happens. Maybe all that is needed is to create a
corresponding /lib/python2.6/site-packages/ folder inside the app
bundle and OS X will automatically use it in the search path--I don't
know.
BTW, is it only the frontend that fires off Python activities or does
the backend need access to them as well?
Finally, please note that I am *not* demanding that something be done
about the Python bindings. Just wanted to raise the issue and see if
I'd done something wrong or if there was some easy tweak to make it
go.
Craig
More information about the mythtv-users
mailing list