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