2 # - package /usr/lib/qt4/plugins/designer/* ?
3 # - better place for %{py_sitedir}/dbus{,/mainloop} dirs ?
8 Summary: Python bindings for the Qt4 toolkit
9 Summary(pl.UTF-8): Dowiązania do toolkitu Qt4 dla Pythona
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-x11-gpl-%{version}.tar.gz
16 # Source0-md5: 142a32f126f205a2bd77f6a9910f5333
17 Patch0: %{name}-dbuspath.patch
18 Patch1: %{name}-64bit.patch
19 URL: http://www.riverbankcomputing.com/software/pyqt/
20 BuildRequires: QtDesigner-devel
21 BuildRequires: QtGui-devel
22 BuildRequires: QtHelp-devel
23 BuildRequires: QtNetwork-devel
24 BuildRequires: QtOpenGL-devel
25 BuildRequires: QtScript-devel
26 BuildRequires: QtSql-devel
27 BuildRequires: QtSvg-devel
28 BuildRequires: QtTest-devel
29 BuildRequires: QtWebKit-devel
30 BuildRequires: QtXml-devel
31 BuildRequires: QtXmlPatterns-devel
32 BuildRequires: pkgconfig
33 BuildRequires: python-dbus-devel >= 0.80
34 BuildRequires: python-sip-devel >= %{sipver}
35 BuildRequires: qt4-build >= 4.3.3-3
36 BuildRequires: qt4-phonon-devel
37 BuildRequires: qt4-qmake >= 4.3.3-3
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.219
40 BuildRequires: sed >= 4.0
41 %pyrequires_eq python-libs
43 Requires: python-sip >= %{sipver}
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define _noautoreqdep libGL.so.1 libGLU.so.1
47 %define _sipfilesdir %{_datadir}/sip
50 PyQt4 is a set of Python bindings for the Qt4 toolkit. The bindings
51 are implemented as a set of Python modules: QtCore, QtDesigner, QtGui,
52 QtHelp, QtNetwork, QtOpenGL, QtScript, QtSql, QtSvg, QtTest, QtWebKit,
53 QtXmlPatterns and QtXml.
55 %description -l pl.UTF-8
56 PyQt4 to zbiór dowiązań do Qt4 dla Pythona. Dowiązania zostały
57 zaimplementowane jako moduły Pythona: QtCore, QtDesigner,
58 QtGui, QtHelp, QtNetwork, QtOpenGL, QtScript, QtSql, QtSvg, QtTest,
59 QtWebKit, QtXmlPatterns i QtXml.
62 Summary: Files needed to build other bindings based on Qt4
63 Summary(pl.UTF-8): Pliki potrzebne do budowania innych dowiązań bazowanych na Qt4
64 Group: Development/Languages/Python
65 Requires: %{name} = %{version}-%{release}
66 Requires: python-sip-devel
69 Files needed to build other bindings for C++ classes that inherit from
70 any of the Qt4 classes (e.g. KDE or your own).
72 %description devel -l pl.UTF-8
73 Pliki potrzebne do budowania innych dowiązań do klas C++
74 dziedziczących z dowolnej klasy Qt4 (np. KDE lub własnych).
77 Summary: Examples for PyQt4
78 Summary(pl.UTF-8): Przykłady do PyQt4
79 Group: Libraries/Python
80 Requires: %{name} = %{version}-%{release}
83 Examples code demonstrating how to use the Python bindings for Qt4.
85 %description examples -l pl.UTF-8
86 Przykładowy kod demonstrujący jak używać PyQt4.
88 %package -n qscintilla2-%{module}-api
89 Summary: PyQt4 API file for QScintilla
90 Summary(pl.UTF-8): Plik API PyQt4 dla QScintilli
91 Group: Libraries/Python
92 Requires: python-qscintilla2 >= 2.2-2
94 %description -n qscintilla2-%{module}-api
95 PyQt4 API file can be used by the QScintilla editor component to
96 enable the use of auto-completion and call tips when editing PyQt4
99 %description -n qscintilla2-%{module}-api -l pl.UTF-8
100 Plik API PyQt4 może być używany przez komponent edytora QScintilla aby
101 umożliwić automatyczne dopełnianie i podpowiedzi przy modyfikowaniu
102 kodu wykorzystującego PyQt4.
105 %setup -q -n PyQt-x11-gpl-%{version}
106 %{__sed} -i 's,pyuic.py,pyuic.pyc,' configure.py
107 # small hack to build for shared libs - symbol QT_SHARED not defined anymore?
108 %{__sed} -i 's/qt_shared = lines\[.*\]/qt_shared = "y"/' configure.py
109 %{__sed} -i 's/resp = sys.stdin.readline.*/resp = "yes"/' configure.py
114 python configure.py \
119 -q "%{_bindir}/qmake-qt4" \
120 -v %{_sipfilesdir}/%{module} \
121 --dbus-path="%{py_sitedir}/dbus/mainloop" \
122 LIBDIR_QT="%{_libdir}" \
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
133 DESTDIR=$RPM_BUILD_ROOT \
134 INSTALL_ROOT=$RPM_BUILD_ROOT
136 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
137 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
139 # don't use py_postclean, leave *.py in %{py_sitedir}/PyQt4/uic/widget-plugins
140 rm $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/*.py
141 rm $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/*.py
142 rm $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/Compiler/*.py
143 rm $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/Loader/*.py
144 rm $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/port_v2/*.py
145 rm $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/port_v3/*.py
147 cp -R examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
150 rm -rf $RPM_BUILD_ROOT
153 %defattr(644,root,root,755)
154 %doc NEWS README THANKS
155 %attr(755,root,root) %{_bindir}/*
156 %attr(755,root,root) %{_libdir}/qt4/plugins/designer/libpythonplugin.so
157 %dir %{py_sitedir}/PyQt4
158 %attr(755,root,root) %{py_sitedir}/PyQt4/*.so*
159 %dir %{py_sitedir}/dbus
160 %dir %{py_sitedir}/dbus/mainloop
161 %attr(755,root,root) %{py_sitedir}/dbus/mainloop/qt.so
162 %{py_sitedir}/PyQt4/*.py[co]
163 %{py_sitedir}/PyQt4/uic
166 %defattr(644,root,root,755)
167 %{_sipfilesdir}/PyQt4
170 %defattr(644,root,root,755)
171 %{_examplesdir}/%{name}-%{version}
173 %files -n qscintilla2-%{module}-api
174 %defattr(644,root,root,755)
175 %{_datadir}/qt4/qsci/api/python/PyQt4.api