Python assistance

Craig Treleaven ctreleaven at cogeco.ca
Thu Nov 15 15:42:38 PST 2012


Hi:

Background - MythTV is primarily written in C and C++ but certain 
functions are implemented in Python.  Not knowing Python--and more 
specifically Python on OS X and even more specifically, Python on OS 
X via MacPorts--I am at a loss as to the proper method to install 
Myth's Python bindings.  See https://trac.macports.org/ticket/36783

Currently, Myth's Python bindings are being installed to:
/opt/local/lib/python2.6/site-packages/MythTV

I understand they should be installed to:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages

A user noticed that the shebang line on the involved setup.py was:
#!/usr/bin/env python

However, even after changing this to:
#!/opt/local/bin/python2.6

the bindings are still installed to the wrong place.  The relevant 
bit of the debug log seems to be:
>make[1]: Entering directory 
>`/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_mythtv-core.25_rev7/mythtv-core.25/work/mythtv-117b611e/mythtv/bindings/python'
>/opt/local/bin/python2.6 setup.py install --skip-build 
>--root="/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_mythtv-core.25_rev7/mythtv-core.25/work/destroot" 
>--prefix="/opt/local"
>running install
>running install_lib
>creating 
>/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_mythtv-core.25_rev7/mythtv-core.25/work/destroot/opt/local/lib/python2.6
>creating 
>/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_mythtv-core.25_rev7/mythtv-core.25/work/destroot/opt/local/lib/python2.6/site-packages
>creating 
>/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_mythtv-core.25_rev7/mythtv-core.25/work/destroot/opt/local/lib/python2.6/site-packages/MythTV

[Many lines omitted...]

Is it the --prefix flag that I need to modify?  Do I just append 
'/Library/Frameworks/Python.framework/Versions/2.6'?  Or is there 
something else?

Many thanks for any pointers.

Craig


More information about the macports-dev mailing list