%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%global shortname pycha
Name: python-pycha
Version: 0.5.2
Release: 2%{?dist}
Summary: A library for drawing charts with Python and Cairo
Group: Development/Libraries
License: LGPLv3+
URL: http://bitbucket.org/lgs/pycha/wiki/Home
Source0: http://pypi.python.org/packages/source/p/%{shortname}/%{shortname}-%{version}.tar.gz
Source1: chavier.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: desktop-file-utils
BuildRequires: pycairo
BuildRequires: python2-devel
BuildRequires: python-setuptools
Requires: pycairo
%description
Pycha is a very simple Python package for drawing charts using the great Cairo
library. Its goals are:
* Lightweight
* Simple to use
* Nice looking with default values
* Customization
It won't try to draw any possible chart on earth but draw the most common ones
nicely.
%package -n chavier
Summary: GUI application for exploring the pycha library
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
%description -n chavier
Chavier allows the user to generate random data sets or use existing data to
test the various options that %{shortname} provides in an interactive GUI
application. Various chart types can be plotted and their options adjusted
from the interface.
%prep
%setup -q -n %{shortname}-%{version}
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
%clean
rm -rf %{buildroot}
%check
%{__python} setup.py test
%files
%defattr(-,root,root,-)
%doc examples/ COPYING AUTHORS README.txt
%{python_sitelib}/%{shortname}
%{python_sitelib}/%{shortname}-*.egg-info
%files -n chavier
%defattr(-,root,root,-)
%{_bindir}/chavier
%{_datadir}/applications/chavier.desktop
%{python_sitelib}/chavier
%changelog
* Sat Mar 27 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 0.5.2-2
- changed license from LGPLv3 to LGPLv3+
- fixed spelling error in %%description
- capitalized chavier package %%summary
- added pycairo Requires
- removed tests
* Tue Mar 23 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 0.5.2-1
- first Fedora release