## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global pypi_name PyQt6_Charts

Name:           python-pyqt6-charts
Version:        6.8.0
Release:        %autorelease
Summary:        Set of Python bindings for The Qt Charts library
License:        GPL-3.0-only
URL:            https://www.riverbankcomputing.com/software/pyqtchart/
Source0:        %pypi_source

BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  python3-devel
BuildRequires:  python3-pyqt6-devel >= 6.2.0
BuildRequires:  %{py3_dist sip} >= 6
BuildRequires:  %{py3_dist PyQt-builder} >= 1.10
BuildRequires:  qt6-qtcharts-devel

%description
PyQt6_Charts is a set of Python bindings for The Qt Company's Qt Charts library.
The bindings sit on top of PyQt6 and are implemented as a single module.


%package -n python3-pyqt6-charts
Summary:    %{summary}
%{?python_provide:%python_provide python3-pyqt6-charts}
Requires:   python3-pyqt6

%description -n python3-pyqt6-charts
PyQt6_Charts is a set of Python 3 bindings for The Qt Company's Qt Charts library.
The bindings sit on top of PyQt6 and are implemented as a single module.


%package -n python3-pyqt6-charts-devel
Summary:    Development files for PyQt6_Charts
%{?python_provide:%python_provide python3-pyqt6-charts-devel}
Requires:   python3-pyqt6-charts%{_isa} = %{version}-%{release}
Requires:   python3-pyqt6-devel

%description -n python3-pyqt6-charts-devel
Development files for PyQt6_Charts, such as sip files.


%prep
%autosetup -p1 -n PyQt6_Charts-%{version}


%build
sip-build \
  --no-make \
  --qmake="%{_qt6_qmake}" \
  --api-dir=%{_qt6_datadir}/qsci/api/python \
  --verbose \
  --qmake-setting 'QMAKE_CFLAGS_RELEASE="%{build_cflags}"' \
  --qmake-setting 'QMAKE_CXXFLAGS_RELEASE="%{build_cxxflags}"' \
  --qmake-setting 'QMAKE_LFLAGS_RELEASE="%{build_ldflags}"'

%make_build -C build


%install
%make_install INSTALL_ROOT=%{buildroot} -C build

# Make sure all modules are executable for RPM to get their dependencies, debuginfo, etc.
for i in %{buildroot}%{python3_sitearch}/PyQt6/*.so ; do
test -x $i || chmod a+rx $i
done

%check
# Make sure we don't leak buildroot to dist-info
grep %{buildroot} %{buildroot}%{python3_sitearch}/*.dist-info/* && exit 1 || true


%files -n python3-pyqt6-charts
%license LICENSE
%doc ChangeLog NEWS README.md
%{python3_sitearch}/PyQt6_Charts-%{version}.dist-info
%{python3_sitearch}/PyQt6/QtCharts.*

%files -n python3-pyqt6-charts-devel
%{python3_sitearch}/PyQt6/bindings/QtCharts/
%dir %{_qt6_datadir}/qsci/
%dir %{_qt6_datadir}/qsci/api/
%dir %{_qt6_datadir}/qsci/api/python/
%{_qt6_datadir}/qsci/api/python/PyQt6-Charts.api


%changelog
## START: Generated by rpmautospec
* Mon Dec 09 2024 Jan Grulich <jgrulich@redhat.com> - 6.8.0-1
- 6.8.0

* Mon Oct 21 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 6.7.0-4
- Rebuilt for Qt 6.8.0

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 6.7.0-2
- Rebuilt for Python 3.13

* Fri Apr 26 2024 Jan Grulich <jgrulich@redhat.com> - 6.7.0-1
- Update to 6.7.0

* Mon Apr 08 2024 Jan Grulich <jgrulich@redhat.com> - 6.6.0-5
- Rebuild (qt6)

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Wed Nov 29 2023 Jan Grulich <jgrulich@redhat.com> - 6.6.0-2
- Rebuild (qt6)

* Mon Oct 30 2023 Jan Grulich <jgrulich@redhat.com> - 6.6.0-1
- 6.6.0

* Fri Oct 13 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.0-7
- Rebuild (qt6)

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Wed Jul 12 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.0-5
- Rebuild for qtbase private API version change

* Wed Jul 12 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.0-4
- Rebuild for qtbase private API version change

* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 6.5.0-3
- Rebuilt for Python 3.12

* Tue May 30 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.0-2
- Rebuild (qt6)

* Thu May 18 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 6.5.0-1
- Update to 6.5.0

* Fri May 05 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 6.4.0-2
- Rebuild for Qt 6.5.0

* Thu May 04 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 6.4.0-1
- Initial build
## END: Generated by rpmautospec