[MacPorts] #35506: py27-pyqt4 @4.9.1 Failed to install

MacPorts noreply at macports.org
Wed Aug 15 11:25:38 PDT 2012


#35506: py27-pyqt4 @4.9.1 Failed to install
--------------------------------+-------------------------------------------
 Reporter:  sahaimic@…          |       Owner:  michaelld@…           
     Type:  defect              |      Status:  new                   
 Priority:  Normal              |   Milestone:                        
Component:  ports               |     Version:  2.1.2                 
 Keywords:                      |        Port:  py27-pyqt4            
--------------------------------+-------------------------------------------

Comment(by michaelld@…):

 So, I don't know how to fix this yet, but here's the issue at hand.  I'm
 partly writing this to notify others on this ticket of what's going on,
 and partly to keep a reminder for myself in case I have to do something
 else for a while & come back to this later.  I hope to hack through this
 in the next couple of days, but you never know ... :)

 With the release of qt4-mac 4.8, I switched where Qt's frameworks were
 installed from ${prefix}/lib to ${prefix}/Library/Frameworks -- makes
 sense, right?  This switch was by "popular demand", and the QMake hacking
 wasn't too difficult. Basically, I added a set of variables that
 replicated LIBDIR for FRAMEWORKDIR.  From the above patch, I missed that
 one's initial setting, but otherwise the system works.  MacPorts' Qt4
 provides both LIBDIR and FRAMEWORKDIR, such that if Qt is installed as
 libraries one should use LIBDIR and if as frameworks then FRAMEWORKDIR;
 ditto for installing other projects that link with Qt4.  And, these are
 well and correctly defined if using QMake, PKGCONFIG, and/or GNU LIBTOOL.
 Which covers, I think, most projects and ports.  Internally, QMake's
 initial settings include one for "installed as framework" which is easy to
 test for and use.  I think if using PKGCONFIG and/or GNU LIBTOOL it would
 not be difficult to determine whether Qt was installed as libraries or
 frameworks (e.g., check LDFLAGS for "framework").

 PyQt4's initial test for QtCore uses QMake, which with the above patch
 will succeed in finding, linking, and executing a Qt-based application
 (which prints out a bunch of Qt variables, which are then parsed
 internally).  All the rest of PyQt4's tests -- for QtGUI and so forth --
 rely on SIP instead of QMake (installed as py-sip etc).  SIP does all of
 its Qt library / framework determination internally, not relying on QMake,
 PKGCONFIG, and/or GNU LIBTOOL.  Hence, its assumptions about where Qt's
 frameworks are installed are not correct with regard to the framework
 location change I made to Qt 4.8.  PyQt4 actually assumes that Qt is
 installed as libraries, I think, but it does contain a "Qt as framework"
 flag that I can easily patch in and hack to select that option.

 So all of this means I have to go and hack on SIP for a bit to get it's
 internal representation of Qt4's install locations correct.  Then, I have
 to hack on PyQt4 a bit to get it to recognize "Qt as framework" and also
 pass the correct flags to SIP.  I think there are actually very few
 changes required to do this, but I have to find them through reading code,
 patches, and testing -- to some degree "trial and error".  Hence, it'll
 take me a bit to get this all worked through, given the complexity of the
 situation.

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


More information about the macports-tickets mailing list