84d9325
%if 0%{?fedora}
c3a8ea9
%global with_python3 1
84d9325
%endif
84d9325
84d9325
%global modname pygal
84d9325
84d9325
Name:               python-pygal
66a5bc1
Version:            1.4.6
c3a8ea9
Release:            1%{?dist}
84d9325
Summary:            A python svg graph plotting library
84d9325
84d9325
Group:              Development/Libraries
84d9325
License:            LGPLv3+
84d9325
URL:                http://pypi.python.org/pypi/pygal
84d9325
Source0:            http://pypi.python.org/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
84d9325
BuildRequires:      pytest
84d9325
BuildRequires:      python-lxml
84d9325
84d9325
%if 0%{?with_python3}
84d9325
BuildRequires:      python3-devel
84d9325
BuildRequires:      python3-setuptools
c3a8ea9
# We would need these, but there is no python3-pycairo or python3-pyquery, so
c3a8ea9
# no python3 tests for us yet...
84d9325
#BuildRequires:      python3-pyquery
84d9325
#BuildRequires:      python3-flask
84d9325
#BuildRequires:      python3-cairosvg
84d9325
#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
84d9325
%endif
84d9325
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
84d9325
84d9325
%check
4e9c284
py.test pygal/test
5ba5ac9
84d9325
# Tests would require python3-flask, which does not exist.  Disabled for now.
84d9325
#%%if 0%%{?with_python3}
84d9325
#pushd %%{py3dir}
84d9325
#%%{__python3} setup.py test
84d9325
#popd
84d9325
#%%endif
84d9325
84d9325
%files
84d9325
%doc README
84d9325
%{python_sitelib}/%{modname}/
84d9325
%{python_sitelib}/%{modname}-%{version}*
84d9325
%{_bindir}/pygal_gen.py
84d9325
84d9325
%if 0%{?with_python3}
84d9325
%files -n python3-pygal
84d9325
%doc README
84d9325
%{python3_sitelib}/%{modname}/
84d9325
%{python3_sitelib}/%{modname}-%{version}-*
84d9325
%endif
84d9325
84d9325
%changelog
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