%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Summary:        A Python module for accessing online Google services
Summary(ja):    オンライン Google サービスにアクセスするための Python モジュール
Name:           python-gdata
Version:        1.1.1
Release:        2%{?_dist_release}

Group:          Development/Languages
License:        ASL 2.0
URL:            http://code.google.com/p/gdata-python-client/
Source0:        http://gdata-python-client.googlecode.com/files/gdata.py-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch:      noarch
BuildRequires:  python-devel
Requires:       python
Requires:	python-elementtree

%description
This is a Python module for accessing online Google services, such as:
- Blogger
- Calendar
- Picasa Web Albums
- Spreadsheets
- YouTube
- Notebook

%prep
%setup -q -n gdata.py-%{version}

%build
%{__python} setup.py build

chmod -x samples/*/*.py

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc README.txt RELEASE_NOTES.txt samples/
%{python_sitelib}/atom
%{python_sitelib}/gdata

%changelog
* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 1.1.1-2
- rebuild with python-2.6

* Mon Jul 21 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.1-1
- new upstream release
- build with python2.5

* Mon Apr 28 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.9-1
- initial build for Vine Linux

* Tue Nov 13 2007 - Bastien Nocera <bnocera@redhat.com> - 1.0.9-1
- Update to 1.0.9

* Sun Oct 21 2007 - Bastien Nocera <bnocera@redhat.com> - 1.0.8-3
- Remove CFLAGS from the make part, as there's no native compilation,
  spotted by Parag AN <panemade@gmail.com>

* Tue Oct 16 2007 - Bastien Nocera <bnocera@redhat.com> - 1.0.8-2
- Remove python-elementtree dep, it's builtin to Python 2.5
- Add samples to the docs, for documentation purposes
- Remove unneeded macro

* Fri Oct 12 2007 - Bastien Nocera <bnocera@redhat.com> - 1.0.8-1
- Initial RPM release