e8696a7
%global pypi_name PyQtChart
e8696a7
3a74107
Name:           python-pyqtchart
b1a7c63
Version:        5.15.5
6bf0b24
Release:        %autorelease
3a74107
Summary:        Set of Python bindings for The Qt Charts library
3a74107
License:        GPLv3
3a74107
URL:            https://www.riverbankcomputing.com/software/pyqtchart/
e8696a7
Source0:        %pypi_source
3a74107
ef4ff2f
BuildRequires: make
3a74107
BuildRequires:  python3-devel
3a74107
BuildRequires:  python3-qt5-devel
c3e9206
BuildRequires:  python3dist(sip) >= 5.3
c3e9206
BuildRequires:  python3dist(pyqt-builder) >= 1.6
3a74107
BuildRequires:  qt5-qtcharts-devel
0a083bb
# as of 2020-04-18, depends on libQt5Charts.so.5(Qt_5.14.2_PRIVATE_API)(64bit)
0a083bb
BuildRequires:  qt5-qtbase-private-devel
3a74107
3a74107
%global distinfo %{python3_sitearch}/PyQtChart-%{version}.dist-info
3a74107
3a74107
%description
3a74107
PyQtChart is a set of Python bindings for The Qt Company's Qt Charts library.
3a74107
The bindings sit on top of PyQt5 and are implemented as a single module.
3a74107
3a74107
3a74107
%package -n python3-pyqtchart
3a74107
Summary:    %{summary}
3a74107
%{?python_provide:%python_provide python3-pyqtchart}
3a74107
Requires:   python3-qt5
3a74107
3a74107
%description -n python3-pyqtchart
3a74107
PyQtChart is a set of Python 3 bindings for The Qt Company's Qt Charts library.
3a74107
The bindings sit on top of PyQt5 and are implemented as a single module.
3a74107
3a74107
3a74107
%package -n python3-pyqtchart-devel
3a74107
Summary:    Development files for PyQtChart
3a74107
%{?python_provide:%python_provide python3-pyqtchart-devel}
3a74107
Requires:   python3-pyqtchart%{_isa} == %{version}-%{release}
3a74107
# For the directories:
3a74107
Requires:   python3-qt5-devel
3a74107
Requires:   python3-qscintilla-qt5
3a74107
3a74107
%description -n python3-pyqtchart-devel
3a74107
Development files for PyQtChart, such as sip files.
3a74107
3a74107
3a74107
%prep
0a083bb
%autosetup -p1 -n PyQtChart-%{version}
3a74107
3a74107
3a74107
%build
a796712
%set_build_flags
c3e9206
sip-build \
c3e9206
  --no-make \
c3e9206
  --qmake="%{_qt5_qmake}" \
c3e9206
  --api-dir=%{_qt5_datadir}/qsci/api/python \
c3e9206
  --verbose
c3e9206
%make_build CXXFLAGS="%{optflags} -fPIC \$(DEFINES)" -C build
3a74107
3a74107
3a74107
%install
c3e9206
%make_install INSTALL_ROOT=%{buildroot} -C build
3a74107
862847e
# Make sure all modules are executable for RPM to get their dependencies, debuginfo, etc.
862847e
chmod a+rx %{buildroot}%{python3_sitearch}/PyQt5/*.so
3a74107
3a74107
%check
3a74107
# Make sure we don't leak buildroot to dist-info
553dfbb
grep %{buildroot} %{buildroot}%{distinfo}/* && exit 1 || true
3a74107
3a74107
3a74107
%files -n python3-pyqtchart
3a74107
%license LICENSE
3a74107
%doc ChangeLog NEWS README
3a74107
%{python3_sitearch}/PyQt5/QtChart.*
3a74107
%{distinfo}/
3a74107
3a74107
%files -n python3-pyqtchart-devel
3a74107
%{_datadir}/qt5/qsci/api/python/PyQtChart.api
c3e9206
%{python3_sitearch}/PyQt5/bindings/QtChart/
3a74107
3a74107
3a74107
%changelog
6bf0b24
%autochangelog