06eb999
%global modname cairosvg
bfbf5ac
%global srcname CairoSVG
f75db19
%global py3_prefix python%{python3_pkgversion}
06eb999
06eb999
Name:               python-cairosvg
4a07a2b
Version:            2.5.2
30a8a03
Release:            6%{?dist}
06eb999
Summary:            A Simple SVG Converter for Cairo
06eb999
06eb999
License:            LGPLv3+
bfbf5ac
URL:                https://cairosvg.org/
bfbf5ac
Source0:            %pypi_source
f75db19
Patch0:             %{name}-disable-flake8-isort.patch
06eb999
06eb999
BuildArch:          noarch
06eb999
f75db19
BuildRequires:      %{py3_prefix}-devel
f75db19
BuildRequires:      %{py3_prefix}-cairocffi
f75db19
BuildRequires:      %{py3_prefix}-cssselect2
f75db19
BuildRequires:      %{py3_prefix}-defusedxml
f75db19
BuildRequires:      %{py3_prefix}-pillow
f75db19
BuildRequires:      %{py3_prefix}-setuptools
f75db19
BuildRequires:      %{py3_prefix}-pytest
f75db19
BuildRequires:      %{py3_prefix}-pytest-cov
f75db19
BuildRequires:      %{py3_prefix}-pytest-runner
f75db19
# actually python3-cairocffi should have that dependency (see bug 1698217) but
f75db19
# for now just add the requirement here.
f75db19
BuildRequires:      %{py3_prefix}-xcffib
06eb999
06eb999
a459043
%description
a459043
CairoSVG is a SVG 1.1 to PNG, PDF, PS and SVG converter which can also be used
a459043
as a Python library.
eb7f5ef
0b13c73
%package -n python3-cairosvg
06eb999
Summary:            A Simple SVG Converter for Cairo
06eb999
0b13c73
# The subpackage used to be called this on accident.
0b13c73
# https://bugzilla.redhat.com/show_bug.cgi?id=1263793
0b13c73
Provides:           python3-CairoSVG
0b13c73
62309ad
# %%{_bindir}/cairosvg was moved from here
62309ad
Conflicts:          python2-cairosvg < 1.0.20-11
62309ad
06eb999
0b13c73
%description -n python3-cairosvg
f75db19
CairoSVG is a SVG converter based on Cairo. It can export SVG files to PDF,
f75db19
PostScript and PNG files.
06eb999
06eb999
%prep
bfbf5ac
%autosetup -n %{srcname}-%{version}
06eb999
# Remove bundled egg-info in case it exists
bfbf5ac
rm -rf %{srcname}.egg-info
065c22e
# emulate the git submodule used by upstream - this is required to pass the
065c22e
# test suite
065c22e
mkdir test_non_regression/cairosvg_reference/
065c22e
cp -a $(ls -1 . | grep -v test_non_regression) test_non_regression/cairosvg_reference/
06eb999
06eb999
%build
bfbf5ac
%py3_build
06eb999
06eb999
%install
bfbf5ac
%py3_install
06eb999
f75db19
%check
f75db19
%{__python3} -m pytest -v
f75db19
# remove file which is only required for unit tests
f75db19
rm -f %{buildroot}%{python3_sitelib}/%{modname}/test_api.py
f75db19
f75db19
0b13c73
%files -n python3-cairosvg
f75db19
%license LICENSE
f75db19
%doc README.rst
06eb999
%{python3_sitelib}/%{modname}/
bfbf5ac
%{python3_sitelib}/%{srcname}-%{version}-*
62309ad
%{_bindir}/cairosvg
06eb999
06eb999
%changelog
30a8a03
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-6
30a8a03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
30a8a03
6aae5a8
* Fri Jun 17 2022 Python Maint <python-maint@redhat.com> - 2.5.2-5
6aae5a8
- Rebuilt for Python 3.11
6aae5a8
f48cf06
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-4
f48cf06
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
f48cf06
4d3ed7f
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-3
4d3ed7f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
4d3ed7f
4d0a4ef
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.5.2-2
4d0a4ef
- Rebuilt for Python 3.10
4d0a4ef
4a07a2b
* Wed Mar 10 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 2.5.2-1
4a07a2b
- update to 2.5.2
4a07a2b
e696969
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
e696969
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
e696969
065c22e
* Wed Jan  6 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 2.5.1-1
065c22e
- update to 2.5.1
065c22e
789a5f9
* Sat Nov 07 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.5.0-1
789a5f9
- update to 2.5.0
789a5f9
c6229f5
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-5
c6229f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c6229f5
90c8f69
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-4
90c8f69
- Rebuilt for Python 3.9
90c8f69
90be902
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-3
90be902
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
90be902
112bb16
* Mon Nov 04 2019 Felix Schwarz <fschwarz@fedoraproject.org> - 2.4.2-2
112bb16
- add missing sources
112bb16
f75db19
* Sun Nov 03 2019 Felix Schwarz <fschwarz@fedoraproject.org> - 2.4.2-1
f75db19
- new upstream version
f75db19
7adcb6e
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.20-14
7adcb6e
- Rebuilt for Python 3.8.0rc1 (#1748018)
7adcb6e
27abdf2
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.20-13
27abdf2
- Rebuilt for Python 3.8
27abdf2
3d66ae3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-12
3d66ae3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3d66ae3
62309ad
* Wed Mar 27 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.20-11
62309ad
- Subpackage python2-cairosvg has been removed
62309ad
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
62309ad
586078f
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-10
586078f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
586078f
b072079
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-9
b072079
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b072079
bd004ae
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.20-8
bd004ae
- Rebuilt for Python 3.7
bd004ae
09170e8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-7
09170e8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
09170e8
eb7f5ef
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.20-6
eb7f5ef
- Python 2 binary package renamed to python2-cairosvg
eb7f5ef
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
eb7f5ef
4cba4f1
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-5
4cba4f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4cba4f1
8a092fb
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-4
8a092fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8a092fb
92bc900
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.0.20-3
92bc900
- Rebuild for Python 3.6
92bc900
af82ee5
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.20-2
af82ee5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
af82ee5
e7d08a5
* Mon Apr 04 2016 Ralph Bean <rbean@redhat.com> - 1.0.20-1
e7d08a5
- new version
e7d08a5
1b337c0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.19-3
1b337c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1b337c0
663710b
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.19-2
663710b
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
663710b
9a09353
* Sat Oct 31 2015 Ralph Bean <rbean@redhat.com> - 1.0.19-1
9a09353
- new version
9a09353
1140a64
* Wed Oct 21 2015 Ralph Bean <rbean@redhat.com> - 1.0.18-1
1140a64
- new version
1140a64
2b13a59
* Sat Oct 10 2015 Ralph Bean <rbean@redhat.com> - 1.0.17-1
2b13a59
- new version
2b13a59
0b13c73
* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 1.0.16-2
0b13c73
- Rename the python3 subpackage and Provide the old name.
0b13c73
835f25d
* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 1.0.16-1
835f25d
- new version
835f25d
0958294
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.13-2
0958294
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0958294
95b22a1
* Fri Feb 27 2015 Ralph Bean <rbean@redhat.com> - 1.0.13-1
95b22a1
- new version
95b22a1
329cc88
* Wed Aug 20 2014 Ralph Bean <rbean@redhat.com> - 1.0.9-1
329cc88
- Latest upstream.
329cc88
7bc464a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-3
7bc464a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7bc464a
f505cd0
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.7-2
f505cd0
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
f505cd0
685d17c
* Thu May 08 2014 Ralph Bean <rbean@redhat.com> - 1.0.7-1
685d17c
- Latest upstream.
685d17c
224c4ce
* Fri Mar 07 2014 Ralph Bean <rbean@redhat.com> - 1.0.6-1
224c4ce
- Latest upstream.
224c4ce
a7d02ce
* Wed Feb 12 2014 Ralph Bean <rbean@redhat.com> - 1.0.4-1
a7d02ce
- Latest upstream.
a7d02ce
055ac73
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
055ac73
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
055ac73
06eb999
* Tue Apr 16 2013 Ralph Bean <rbean@redhat.com> - 0.5-2
06eb999
- Updated license to LGPLv3+ after clarification from upstream.
06eb999
  https://github.com/Kozea/CairoSVG/pull/8
06eb999
- Removed reStructuredText markup from the description.
06eb999
06eb999
* Sat Apr 13 2013 Ralph Bean <rbean@redhat.com> - 0.5-1
06eb999
- Initial package for Fedora