Blob Blame Raw
%{!?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.6.0
Release:        9%{?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
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Jan 16 2011 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 0.6.0-1
- new upstream release 0.6.0

* Sat Aug  7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 0.5.3-1
- new upstream bugfix release

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* 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