[MacPorts] #36783: mythtv-core.25 00.25.2-Fixes-20120918 Python paths wrong for site-packages/MythTV

MacPorts noreply at macports.org
Thu Nov 15 00:42:17 PST 2012


#36783: mythtv-core.25 00.25.2-Fixes-20120918 Python paths wrong for site-
packages/MythTV
-----------------------------+--------------------------
  Reporter:  ted.rippert@…   |      Owner:  ctreleaven@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.1.2
Resolution:                  |   Keywords:
      Port:  mythtv-core.25  |
-----------------------------+--------------------------

Comment (by ted.rippert@…):

 OK. I've played around with it, and I think I see what is going on. Here's
 what gives the correct install path:

 {{{
 $ /opt/local/bin/python2.6 -c "from distutils.sysconfig import
 get_python_lib; print get_python_lib()"
 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages
 }}}

 Here's what I get using the syntax from the MythTV setup.py in my normal
 shell:

 {{{
 $ /usr/bin/env python -c "from distutils.sysconfig import get_python_lib;
 print get_python_lib()"
 /Library/Python/2.5/site-packages
 }}}

 which doesn't seem to give anything like the path that the MythTV port
 ended up using.
 However, assuming that "python" in the port set-up had been aliased to
 python2.6:

 {{{
 $ /usr/bin/env python2.6 -c "from distutils.sysconfig import
 get_python_lib; print get_python_lib()"
 /sw/lib/python2.6/site-packages
 }}}

 which is in my Fink installation. Assuming that your port is set to
 replace install directory prefixes with /opt/local, you end up with the
 /opt/local/lib/python2.6/site-packages that the MythTV directory ended up
 in for me.

 It seems like the script would work as is if the macports tree was before
 the Fink tree in my path, but that seems like something prone to breakage
 for a lot of people. I don't know if all your bindings problems are caused
 by this, but you might try using the explicit path to the macports
 python2.6 in your setup scripts if that is an acceptable practice.

-- 
Ticket URL: <https://trac.macports.org/ticket/36783#comment:13>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list