%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: python-messaging
Version: %(%{__python} -c 'from messaging import VERSION; print "%s.%s.%s" % VERSION')
Release: 1%{?dist}
Summary: SMS encoder/decoder library
License: GPL
Group: Development
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildArch: noarch
BuildRequires: python-devel
%if 0%{?fedora} >= 8
BuildRequires: python-setuptools-devel
%else
BuildRequires: python-setuptools
%endif
%description
Pure python SMS encoder/decoder library
%prep
%setup -q -n %{name}-%{version}
%build
%{__python} -c 'import setuptools; execfile("setup.py")' build
%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%{__python} -c 'import setuptools; execfile("setup.py")' install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%files
%{python_sitelib}
%defattr(-,root,root,-)
%doc README
%changelog
* Tue Jan 24 2012 - Andrew Bird