84d9325
%if 0%{?fedora}
c3a8ea9
%global with_python3 1
84d9325
%endif
84d9325
84d9325
%global modname pygal
84d9325
84d9325
Name:               python-pygal
8a37fa6
Version:            2.3.1
a63d908
Release:            2%{?dist}
84d9325
Summary:            A python svg graph plotting library
84d9325
84d9325
Group:              Development/Libraries
84d9325
License:            LGPLv3+
ec72d08
URL:                https://pypi.io/project/pygal
ec72d08
Source0:            https://pypi.io/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
84d9325
84d9325
BuildArch:          noarch
84d9325
84d9325
BuildRequires:      python2-devel
84d9325
BuildRequires:      python-setuptools
84d9325
BuildRequires:      python-pyquery
84d9325
BuildRequires:      python-flask
84d9325
BuildRequires:      python-cairosvg
212f1b5
BuildRequires:      python-cairocffi
84d9325
BuildRequires:      pytest
84d9325
BuildRequires:      python-lxml
84d9325
84d9325
%if 0%{?with_python3}
84d9325
BuildRequires:      python3-devel
84d9325
BuildRequires:      python3-setuptools
212f1b5
BuildRequires:      python3-pyquery
212f1b5
BuildRequires:      python3-flask
212f1b5
212f1b5
# See https://bugzilla.redhat.com/show_bug.cgi?id=1263793
84d9325
#BuildRequires:      python3-cairosvg
212f1b5
BuildRequires:      python3-CairoSVG
212f1b5
BuildRequires:      python3-cairocffi
212f1b5
212f1b5
BuildRequires:      python3-pytest
84d9325
BuildRequires:      python3-lxml
84d9325
%endif
84d9325
84d9325
Requires:           python-lxml
84d9325
84d9325
%description
84d9325
A python svg graph plotting library.
84d9325
84d9325
%if 0%{?with_python3}
84d9325
%package -n python3-pygal
84d9325
Summary:            A python svg graph plotting library
84d9325
Group:              Development/Libraries
84d9325
84d9325
Requires:           python3-lxml
84d9325
84d9325
%description -n python3-pygal
84d9325
A python svg graph plotting library
84d9325
%endif
84d9325
84d9325
%prep
84d9325
%setup -q -n %{modname}-%{version}
84d9325
84d9325
# Remove bundled egg-info in case it exists
84d9325
rm -rf %{modname}.egg-info
84d9325
%if 0%{?with_python3}
84d9325
rm -rf %{py3dir}
84d9325
cp -a . %{py3dir}
84d9325
%endif
84d9325
84d9325
%build
84d9325
%{__python} setup.py build
84d9325
%if 0%{?with_python3}
84d9325
pushd %{py3dir}
84d9325
%{__python3} setup.py build
84d9325
popd
84d9325
%endif
84d9325
84d9325
84d9325
%install
84d9325
%if 0%{?with_python3}
84d9325
pushd %{py3dir}
84d9325
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
84d9325
popd
a1ebfd6
mv %{buildroot}%{_bindir}/pygal_gen.py pygal_gen.py.py3
a1ebfd6
%endif
a1ebfd6
a1ebfd6
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
a1ebfd6
a1ebfd6
%if 0%{?with_python3}
a1ebfd6
mv pygal_gen.py.py3 %{buildroot}%{_bindir}/pygal_gen.py
84d9325
%endif
84d9325
84d9325
%check
b5a8568
%if 0%{?fedora}
4e9c284
py.test pygal/test
5ba5ac9
212f1b5
%if 0%{?with_python3}
212f1b5
pushd %{py3dir}
212f1b5
## python3 tests aren't quite working yet.  something to do with cairocffi, but
212f1b5
## I can't duplicate it locally....
212f1b5
#py.test-%{python3_version} pygal/test
212f1b5
popd
212f1b5
%endif
212f1b5
b5a8568
%endif
84d9325
84d9325
%files
84d9325
%doc README
a1ebfd6
%if !0%{?with_python3}
a1ebfd6
%{_bindir}/pygal_gen.py
a1ebfd6
%endif
84d9325
%{python_sitelib}/%{modname}/
84d9325
%{python_sitelib}/%{modname}-%{version}*
84d9325
84d9325
%if 0%{?with_python3}
84d9325
%files -n python3-pygal
84d9325
%doc README
a1ebfd6
%if 0%{?with_python3}
a1ebfd6
%{_bindir}/pygal_gen.py
a1ebfd6
%endif
84d9325
%{python3_sitelib}/%{modname}/
84d9325
%{python3_sitelib}/%{modname}-%{version}-*
84d9325
%endif
84d9325
84d9325
%changelog
a63d908
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-2
a63d908
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a63d908
8a37fa6
* Tue Dec 27 2016 Kevin Fenzi <kevin@scrye.com> - 2.3.1-1
8a37fa6
- Update to 2.3.1. Fixes bug #1400596
8a37fa6
8898ba0
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 2.3.0-2
8898ba0
- Rebuild for Python 3.6
8898ba0
ec72d08
* Tue Sep 06 2016 Ralph Bean <rbean@redhat.com> - 2.3.0-1
ec72d08
- new version
ec72d08
b56d643
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.3-2
b56d643
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b56d643
73e95a4
* Wed Jun 01 2016 Kevin Fenzi <kevin@scrye.com> - 2.2.3-1
73e95a4
- Update to 2.2.3. Fixes bug #1341395
73e95a4
9e0739c
* Thu Apr 28 2016 Kevin Fenzi <kevin@scrye.com> - 2.2.2-1
9e0739c
- Update to 2.2.2. Fixes bug #1330791
9e0739c
d186665
* Sat Apr 23 2016 Kevin Fenzi <kevin@scrye.com> - 2.2.1-1
d186665
- Update to 2.2.1. Fixes bug #1329207
d186665
658eb4f
* Mon Apr 04 2016 Ralph Bean <rbean@redhat.com> - 2.1.1-1
658eb4f
- new version
658eb4f
15cba8a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.10-2
15cba8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
15cba8a
be33767
* Fri Dec 11 2015 Ralph Bean <rbean@redhat.com> - 2.0.10-1
be33767
- new version
be33767
11c7e0d
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.8-3
11c7e0d
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
11c7e0d
a1ebfd6
* Fri Nov  6 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 2.0.8-2
a1ebfd6
- Ship the pygal_gen.py script in python3-pygal.  Several reasons for this:
a1ebfd6
  * It uses /usr/bin/python3 so it was creating a dep on python3 in the
a1ebfd6
    python2 package
a1ebfd6
  * It wouldn't function without manual user intervention as it needed
a1ebfd6
    the python3-pygal package but didn't have a dep on that.
a1ebfd6
f4df2c7
* Tue Oct 20 2015 Ralph Bean <rbean@redhat.com> - 2.0.8-1
f4df2c7
- new version
f4df2c7
507c138
* Mon Sep 28 2015 Ralph Bean <rbean@redhat.com> - 2.0.7-1
507c138
- new version
507c138
212f1b5
* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 2.0.6-1
212f1b5
- Latest upstream.
212f1b5
- Enabled python3 tests.  We can do this now!!
212f1b5
  It's like I'm living in the future.
212f1b5
156936a
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-2
156936a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
156936a
279a357
* Mon Jan 19 2015 Ralph Bean <rbean@redhat.com> - 1.6.1-1
279a357
- new version
279a357
ccbcafd
* Mon Nov 10 2014 Ralph Bean <rbean@redhat.com> - 1.5.1-1
ccbcafd
- Latest upstream RHBZ#1140143.
ccbcafd
b5a8568
* Thu Sep 04 2014 Ralph Bean <rbean@redhat.com> - 1.5.0-2
b5a8568
- Disable tests for epel.
b5a8568
7351c1c
* Mon Aug 18 2014 Ralph Bean <rbean@redhat.com> - 1.5.0-1
7351c1c
- Latest upstream.
7351c1c
c9c65dd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-3
c9c65dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c9c65dd
b9eff93
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.4.6-2
b9eff93
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
b9eff93
66a5bc1
* Tue Apr 22 2014 Ralph Bean <rbean@redhat.com> - 1.4.6-1
66a5bc1
- Latest upstream.
66a5bc1
4e5a24a
* Fri Mar 07 2014 Ralph Bean <rbean@redhat.com> - 1.4.5-1
4e5a24a
- Latest upstream.
4e5a24a
4e9c284
* Thu Feb 27 2014 Ralph Bean <rbean@redhat.com> - 1.4.2-1
4e9c284
- Latest upstream.
4e9c284
- Reenabled tests.
4e9c284
a90aee7
* Wed Feb 26 2014 Ralph Bean <rbean@redhat.com> - 1.4.1-1
a90aee7
- Latest upstream.
a90aee7
- Disable tests for https://github.com/Kozea/pygal/issues/97
a90aee7
007f19d
* Wed Feb 12 2014 Ralph Bean <rbean@redhat.com> - 1.3.1-1
007f19d
- Latest upstream.
007f19d
5ba5ac9
* Sun Feb 02 2014 Ralph Bean <rbean@redhat.com> - 1.2.3-1
5ba5ac9
- Latest upstream
5ba5ac9
- Re-enabled tests.
5ba5ac9
c91e623
* Thu Jan 30 2014 Ralph Bean <rbean@redhat.com> - 1.2.2-1
c91e623
- Latest upstream.
c91e623
- Remove patch, now upstreamed.
c91e623
- Disable tests.. pytest is behaving strangely.
c91e623
c3a8ea9
* Fri Nov 15 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-1
c3a8ea9
- Latest upstream.
c3a8ea9
- Re-enabled python3 subpackage.
c3a8ea9
- Patch to get around encoding issues in the build step.
c3a8ea9
- Updated comment about requirements for python3 tests.
c3a8ea9
bb19ef0
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.0-3
bb19ef0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bb19ef0
84d9325
* Tue Apr 16 2013 Ralph Bean <rbean@redhat.com> - 0.13.0-2
84d9325
- Updated license with clarification from usptream
84d9325
  https://github.com/Kozea/pygal/pull/32
84d9325
84d9325
* Sat Apr 13 2013 Ralph Bean <rbean@redhat.com> - 0.13.0-1
84d9325
- Initial package for Fedora