View Single Post
Old 08-11-2009, 12:43 AM   #5
rgheck
Nameless Being
 
This fixes it for me, except for the libpoppler issue, which is a Fedora problem, I assume.

--- pyqtdistutils.py.orig 2009-08-11 00:27:54.161464077 -0400
+++ pyqtdistutils.py 2009-08-11 00:41:38.795338399 -0400
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
@@ -14,7 +15,15 @@
import sipconfig, os, sys, string, glob, shutil
from PyQt4 import pyqtconfig
iswindows = 'win32' in sys.platform
-QMAKE = os.path.expanduser('~/qt/bin/qmake') if 'darwin' in sys.platform else'qmake'
+if 'darwin' in sys.platform :
+ QMAKE = os.path.expanduser('~/qt/bin/qmake')
+else:
+ import distutils.spawn
+ if distutils.spawn.find_executable("qmake-qt4"):
+ QMAKE="qmake-qt4"
+ else:
+ QMAKE="qmake"
+
WINDOWS_PYTHON = ['C:/Python26/libs']
OSX_SDK = '/Developer/SDKs/MacOSX10.4u.sdk'

--- setup.py.orig 2009-08-11 00:28:00.521463725 -0400
+++ setup.py 2009-08-11 00:40:21.205588405 -0400
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
@@ -76,7 +77,14 @@
entry_points['console_scripts'].append(
'calibre_postinstall = calibre.linuxost_install')
optional = []
- qmake = '/Volumes/sw/qt/bin/qmake' if isosx else 'qmake'
+ if isosx:
+ qmake = '/Volumes/sw/qt/bin/qmake'
+ else:
+ import distutils.spawn
+ if distutils.spawn.find_executable("qmake-qt4"):
+ qmake="qmake-qt4"
+ else:
+ qmake="qmake"
qmake = os.environ.get('QMAKE', qmake)
def qmake_query(arg=''):
return subprocess.Popen([qmake, '-query', arg],
  Reply With Quote