File python-qscintilla-qt4.spec of Package python-qscintilla
#
# spec file for package python-qscintilla-qt4
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-qscintilla-qt4
Version: 2.10
Release: 0
Summary: Python Bindings for the C++ Editor Class Library
License: GPL-3.0-only
Group: Development/Libraries/C and C++
URL: http://www.riverbankcomputing.co.uk/qscintilla
Source: QScintilla_gpl-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module qt4-devel}
BuildRequires: %{python_module sip-devel >= 4.19.4}
BuildRequires: libdrm-devel
BuildRequires: libqscintilla_qt4-devel
BuildRequires: python-rpm-macros
Requires: %{name}-sip = %{version}
Requires: python-sip(api) = %{python_sip_api_ver}
%requires_ge libqt4-x11
%requires_ge python-qt4
%ifpython2
%requires_ge python2-qt4
Obsoletes: %{oldpython}-qscintilla < %{version}
Provides: %{oldpython}-qscintilla = %{version}
%endif
%ifpython3
Obsoletes: python3-qscintilla < %{version}
Provides: python3-qscintilla = %{version}
%endif
%python_subpackages
%description
QScintilla is a Qt port of Neil Hodgson's Scintilla C++ editor class.
This is a Qt port from the original Scintilla class
(http://www.scintilla.org/).
%package -n %{name}-sip
Summary: sip files for PyQScintilla
Group: Development/Libraries/Python
Provides: %{python_module qscintilla-qt4-sip = %{version}}
Provides: %{python_module qscintilla-sip = %{version}}
Obsoletes: %{python_module qscintilla-sip < %{version}}
%description -n %{name}-sip
QScintilla is a Qt port of Neil Hodgson's Scintilla C++ editor class.
This is a Qt port from the original Scintilla class
(http://www.scintilla.org/).
This package contains sip files used to generate bindings to
QScintilla.
%prep
%setup -q -n QScintilla_gpl-%{version}
%build
%{python_expand cp -r Python Python_%{$python_bin_suffix}
pushd Python_%{$python_bin_suffix}
$python configure.py \
--pyqt=PyQt4 \
--sip=%{_bindir}/sip-%{$python_bin_suffix} \
--pyqt-sipdir=%{_datadir}/sip/PyQt4 \
--qmake=%{_bindir}/qmake \
--no-dist-info \
--no-stubs \
--no-qsci-api
make %{?_smp_mflags}
popd
}
%install
%{python_expand pushd Python_%{$python_bin_suffix}
%make_install INSTALL_ROOT=%{buildroot}
popd
}
%files %{python_files}
%license LICENSE
%doc NEWS README
%{python_sitearch}/PyQt4/Qsci.so
%files -n %{name}-sip
%{_datadir}/sip/PyQt4/Qsci
%changelog