Python assistance
Bradley Giesbrecht
pixilla at macports.org
Thu Nov 15 17:04:55 PST 2012
On Nov 15, 2012, at 3:42 PM, Craig Treleaven wrote:
> 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.
The python portgroups might help you:
_resources/port1.0/group/python*
For python > 2.5:
default destroot.destdir {"--prefix=${frameworks_dir}/Python.framework/Versions/${python.branch} --root=${destroot}"}
Regards,
Bradley Giesbrecht (pixilla)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20121115/894afeb0/attachment.p7s>
More information about the macports-dev
mailing list