%global modname bitlyapi Name: python-%{modname} Version: 0.1.1 Release: 2%{?dist} Summary: A thin python wrapper for the bit.ly REST API Group: Development/Languages License: BSD URL: http://pypi.python.org/pypi/%{modname} Source0: http://pypi.python.org/packages/source/b/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %description This is a thin Python wrapper for the bit.ly API. Basic usage looks like this: >>> import bitlyapi >>> b = bitlyapi.BitLy(api_user, api_key) >>> res = b.shorten(longUrl='http://www.google.com/') >>> print res['url'] 'http://bit.ly/6Hwstb' >>> print res['long_url'] 'http://www.google.com/' %prep %setup -q -n %{modname}-%{version} # Remove the shebang %{__awk} '{if (NR!=1) {print}}' bitlyapi/bitly.py > bitlyapi/bitly.py.new %{__mv} bitlyapi/bitly.py.new bitlyapi/bitly.py %build %{__python} setup.py build %install %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %check %{__python} setup.py test %files %doc README.rst LICENSE CHANGES.rst %{_bindir}/bitly %{python_sitelib}/* %changelog * Mon Aug 27 2012 Ralph Bean - 0.1.1-2 - Removed deprecated defattr - Replaced hardcoded /usr/bin with %%{_bindir} - Removed double "::" in the %%description. * Sun Apr 22 2012 Ralph Bean - 0.1.1-1 - initial package for Fedora