]> git.pld-linux.org Git - packages/python-PyQt5.git/blob - python-PyQt5.spec
- new
[packages/python-PyQt5.git] / python-PyQt5.spec
1 %define         module  PyQt5
2 # minimal required sip version
3 %define         sip_ver 2:4.16
4 # last qt version covered by these bindings (minimal required is currently 4.1.0)
5 %define         qt_ver  %{version}
6
7 Summary:        Python bindings for the Qt4 toolkit
8 Summary(pl.UTF-8):      Dowiązania do toolkitu Qt4 dla Pythona
9 Name:           python-%{module}
10 Version:        5.3.2
11 Release:        1
12 License:        GPL v2 or GPL v3 with FLOSS exception
13 Group:          Libraries/Python
14 Source0:        http://downloads.sourceforge.net/pyqt/PyQt-gpl-%{version}.tar.gz
15 # Source0-md5:  81ef608fa4f3961918106d0ca07aa68a
16 URL:            http://www.riverbankcomputing.com/software/pyqt/
17 # most of BR comes from configure.py
18 BuildRequires:  Qt5Core-devel >= %{qt_ver}
19 BuildRequires:  Qt5DBus-devel >= %{qt_ver}
20 BuildRequires:  Qt5Gui-devel >= %{qt_ver}
21 BuildRequires:  Qt5Network-devel >= %{qt_ver}
22 BuildRequires:  Qt5OpenGL-devel >= %{qt_ver}
23 BuildRequires:  Qt5Sql-devel >= %{qt_ver}
24 BuildRequires:  Qt5Test-devel >= %{qt_ver}
25 BuildRequires:  Qt5Xml-devel >= %{qt_ver}
26 BuildRequires:  phonon-devel
27 BuildRequires:  pkgconfig
28 BuildRequires:  python-dbus-devel >= 0.80
29 BuildRequires:  python-sip-devel >= %{sip_ver}
30 BuildRequires:  qt5-build >= 4.3.3-3
31 BuildRequires:  qt5-qmake >= 4.3.3-3
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.219
34 BuildRequires:  sed >= 4.0
35 %pyrequires_eq  python-libs
36 Requires:       python-dbus >= 0.80
37 Requires:       python-sip >= %{sip_ver}
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
41 %define         _sipfilesdir    %{_datadir}/sip
42
43 %description
44 PyQt5 is a set of Python bindings for the Qt5 toolkit. The bindings
45 are implemented as a set of Python modules: QtCore, QtDeclarative,
46 QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL,
47 QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml,
48 QtXmlPatterns and phonon.
49
50 %description -l pl.UTF-8
51 PyQt5 to zbiór dowiązań do Qt5 dla Pythona. Dowiązania zostały
52 zaimplementowane jako moduły Pythona: QtCore, QtDeclarative,
53 QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL,
54 QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml,
55 QtXmlPatterns oraz phonon.
56
57 %package devel
58 Summary:        Files needed to build other bindings based on Qt5
59 Summary(pl.UTF-8):      Pliki potrzebne do budowania innych dowiązań opartych na Qt5
60 Group:          Development/Languages/Python
61 Requires:       %{name} = %{version}-%{release}
62 Requires:       python-sip-devel
63
64 %description devel
65 Files needed to build other bindings for C++ classes that inherit from
66 any of the Qt5 classes (e.g. KDE or your own).
67
68 %description devel -l pl.UTF-8
69 Pliki potrzebne do budowania innych dowiązań do klas C++
70 dziedziczących z dowolnej klasy Qt5 (np. KDE lub własnych).
71
72 %package devel-tools
73 Summary:        PyQt5 development tools
74 Summary(pl.UTF-8):      Narzędzia programistyczne PyQt5
75 Group:          X11/Development/Libraries
76 Requires:       %{name} = %{version}-%{release}
77
78 %description devel-tools
79 PyQt5 development tools: pylupdate5, pyrcc5, pyuic5.
80
81 %description devel-tools -l pl.UTF-8
82 Narzędzia programistyczne PyQt5: pylupdate5, pyrcc5, pyuic5.
83
84 %package examples
85 Summary:        Examples for PyQt5
86 Summary(pl.UTF-8):      Przykłady do PyQt5
87 Group:          Libraries/Python
88 Requires:       %{name} = %{version}-%{release}
89
90 %description examples
91 Examples code demonstrating how to use the Python bindings for Qt5.
92
93 %description examples -l pl.UTF-8
94 Przykładowy kod demonstrujący jak używać PyQt5.
95
96 %package -n qscintilla2-%{module}-api
97 Summary:        PyQt5 API file for QScintilla
98 Summary(pl.UTF-8):      Plik API PyQt5 dla QScintilli
99 Group:          Libraries/Python
100 Requires:       python-qscintilla2 >= 2.2-2
101
102 %description -n qscintilla2-%{module}-api
103 PyQt4 API file can be used by the QScintilla editor component to
104 enable the use of auto-completion and call tips when editing PyQt5
105 code.
106
107 %description -n qscintilla2-%{module}-api -l pl.UTF-8
108 Plik API PyQt4 może być używany przez komponent edytora QScintilla aby
109 umożliwić automatyczne dopełnianie i podpowiedzi przy modyfikowaniu
110 kodu wykorzystującego PyQt5.
111
112 %prep
113 %setup -q -n PyQt-gpl-%{version}
114 %{__sed} -i 's,pyuic.py,pyuic.pyc,' configure.py
115 # small hack to build for shared libs - symbol QT_SHARED not defined anymore?
116 %{__sed} -i 's/qt_shared = lines\[.*\]/qt_shared = "y"/' configure.py
117 %{__sed} -i 's/resp = sys.stdin.readline.*/resp = "yes"/' configure.py
118
119 %build
120 %{__python} configure.py \
121         --confirm-license \
122         -c -j 3 \
123         -a \
124         -b %{_bindir} \
125         -d %{py_sitedir} \
126         -q "%{_bindir}/qmake-qt5" \
127         -v %{_sipfilesdir}/%{module} \
128         LIBDIR_QT="%{_libdir}" \
129         CC="%{__cc}" \
130         CXX="%{__cxx}"
131
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
137
138 %{__make} install \
139         DESTDIR=$RPM_BUILD_ROOT \
140         INSTALL_ROOT=$RPM_BUILD_ROOT
141
142 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
143 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
144
145 # don't use py_postclean, leave *.py in %{py_sitedir}/PyQt4/uic/widget-plugins
146 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt5/*.py
147 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt5/uic/*.py
148 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt5/uic/Compiler/*.py
149 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt5/uic/Loader/*.py
150 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt5/uic/port_v2/*.py
151 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt5/uic/port_v3/*.py
152
153 cp -R examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
154
155 %clean
156 rm -rf $RPM_BUILD_ROOT
157
158 %files
159 %defattr(644,root,root,755)
160 %doc NEWS README
161 %attr(755,root,root) %{_libdir}/qt5/plugins/designer/libpyqt5.so
162 %dir %{py_sitedir}/PyQt5
163 %attr(755,root,root) %{py_sitedir}/PyQt5/Qt.so
164 %attr(755,root,root) %{py_sitedir}/PyQt5/QtCore.so
165 %attr(755,root,root) %{py_sitedir}/PyQt5/QtDBus.so
166 %attr(755,root,root) %{py_sitedir}/PyQt5/QtDesigner.so
167 %attr(755,root,root) %{py_sitedir}/PyQt5/QtGui.so
168 %attr(755,root,root) %{py_sitedir}/PyQt5/QtHelp.so
169 %attr(755,root,root) %{py_sitedir}/PyQt5/QtNetwork.so
170 %attr(755,root,root) %{py_sitedir}/PyQt5/QtOpenGL.so
171 %attr(755,root,root) %{py_sitedir}/PyQt5/QtSql.so
172 %attr(755,root,root) %{py_sitedir}/PyQt5/QtTest.so
173 %attr(755,root,root) %{py_sitedir}/PyQt5/QtWidgets.so
174 %attr(755,root,root) %{py_sitedir}/PyQt5/_QOpenGLFunctions_2_0.so
175 %{py_sitedir}/PyQt5/__init__.py[co]
176 %attr(755,root,root) %{py_sitedir}/dbus/mainloop/pyqt5.so
177
178 %files devel
179 %defattr(644,root,root,755)
180 %{_sipfilesdir}/PyQt5
181
182 %files devel-tools
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_bindir}/pylupdate5
185 %attr(755,root,root) %{_bindir}/pyrcc5
186 %attr(755,root,root) %{_bindir}/pyuic5
187 %{py_sitedir}/PyQt5/uic
188
189 %files examples
190 %defattr(644,root,root,755)
191 %{_examplesdir}/%{name}-%{version}
192
193 %files -n qscintilla2-%{module}-api
194 %defattr(644,root,root,755)
195 %{_datadir}/qt5/qsci/api/python/PyQt5.api
This page took 0.101625 seconds and 3 git commands to generate.