[python-bitlyapi] Initial import (#851745)
Ralph Bean
ralph at fedoraproject.org
Wed Aug 29 19:23:32 UTC 2012
commit 831a78e8c02d792afb3c2eecb5be9b3c33f9f428
Author: Ralph Bean <rbean at redhat.com>
Date: Wed Aug 29 15:23:21 2012 -0400
Initial import (#851745)
.gitignore | 1 +
python-bitlyapi.spec | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 64 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..3d1113b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bitlyapi-0.1.1.tar.gz
diff --git a/python-bitlyapi.spec b/python-bitlyapi.spec
new file mode 100644
index 0000000..74c182a
--- /dev/null
+++ b/python-bitlyapi.spec
@@ -0,0 +1,62 @@
+%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 <rbean at redhat.com> - 0.1.1-2
+- Removed deprecated defattr
+- Replaced hardcoded /usr/bin with %%{_bindir}
+- Removed double "::" in the %%description.
+
+* Sun Apr 22 2012 Ralph Bean <rbean at redhat.com> - 0.1.1-1
+- initial package for Fedora
diff --git a/sources b/sources
index e69de29..a208a17 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+93aac3707a3ca8a4fc17f9976ec87cde bitlyapi-0.1.1.tar.gz
More information about the scm-commits
mailing list