python-qtcharts-qt5/python-qtcharts-qt5.spec

106 lines
2.9 KiB
RPMSpec

#
# spec file for package python-qtcharts-qt5
#
# 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/
#
Name: python-qtcharts-qt5
Version: 5.11.3
Release: 0
Summary: PyQtChart - python bindings for Qt5 Charts
License: GPL-3.0-only
Group: Development/Libraries/Python
URL: https://www.riverbankcomputing.com/software/pyqtchart/intro
Source: https://sourceforge.net/projects/pyqt/files/PyQtChart/PyQtChart-%{version}/PyQtChart_gpl-%{version}.tar.gz
BuildRequires: libQt5Charts5
BuildRequires: libQt5Charts5-devel
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: python-qt5
BuildRequires: python-qt5-devel
BuildRequires: python-sip >= 4.19.1
BuildRequires: python-sip-devel >= 4.19.1
Requires: python-qt5
%requires_python_sip_api
%description
This package provides python bindings to Qt5 Charts module.
%package sip
Summary: Sip files for PyQtChart
Group: Development/Libraries/Python
Recommends: %{name} = %{version}
BuildArch: noarch
%description sip
This package contains sip files used to generate
bindings to QtCharts
%package api
Summary: API files for eric6
Group: Development/Tools/IDE
Recommends: %{name} = %{version}
BuildArch: noarch
%description api
This package provides API files for eric6.
%package examples
Summary: PyQtChart examles
Group: Development/Libraries/Python
Recommends: %{name} = %{version}
BuildArch: noarch
%description examples
This package provides PyQtChart examples.
%prep
%setup -q -n PyQtChart_gpl-%{version}
%build
python2 configure.py \
--no-dist-info \
--no-stubs \
--qmake=%{_bindir}/qmake-qt5
make %{?_smp_mflags}
%install
%make_install INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_docdir}/%{name}
find examples -type f -executable -exec sed -i '1s=^#!%{_bindir}/\(python\|env python\)3\?=#!%{_bindir}/env python=' {} +
cp -r examples %{buildroot}%{_docdir}/%{name}
%files
%license LICENSE
%doc NEWS README
%{python_sitearch}/PyQt5/
%{python_sitearch}/PyQt5/QtChart.so
%exclude %{_docdir}/%{name}/examples
%files api
%license LICENSE
%{_datadir}/qt5/qsci/api/python
%files sip
%license LICENSE
%{_datadir}/sip/PyQt5/QtChart
%files examples
%license LICENSE
%{_docdir}/%{name}/examples
%changelog