[python-sanction] Latest upstream with python3 subpackage.

Ralph Bean ralph at fedoraproject.org
Mon Oct 7 15:18:19 UTC 2013


commit ad45a43c07e6967eefd3a49515d4e3e5169e427d
Author: Ralph Bean <rbean at redhat.com>
Date:   Mon Oct 7 11:18:08 2013 -0400

    Latest upstream with python3 subpackage.

 .gitignore           |    1 +
 python-sanction.spec |   87 ++++++++++++++++++++++++++++++++++++++++++++++++--
 sources              |    2 +-
 3 files changed, 86 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d794fc1..c658913 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /sanction-0.1.4.zip
+/sanction-0.3.1.tar.gz
diff --git a/python-sanction.spec b/python-sanction.spec
index 75f88ca..70ec6f9 100644
--- a/python-sanction.spec
+++ b/python-sanction.spec
@@ -1,19 +1,29 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
 %global modname sanction
 
 Name:               python-sanction
-Version:            0.1.4
-Release:            2%{?dist}
+Version:            0.3.1
+Release:            1%{?dist}
 Summary:            A simple, lightweight OAuth2 client
 Group:              Development/Libraries
 License:            MIT
 URL:                http://pypi.python.org/pypi/sanction
-Source0:            http://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.zip
+Source0:            http://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz
 
 BuildArch:          noarch
 
 BuildRequires:      python2-devel
 BuildRequires:      python-nose
 
+%if 0%{?with_python3}
+BuildRequires:      python3-devel
+BuildRequires:      python3-nose
+%endif
+
+
 %description
 python-sanction is a lightweight, dead simple client implementation of
 the OAuth2 protocol.
@@ -44,19 +54,79 @@ sanction has been tested with the following OAuth2 providers:
 * Instagram
 * DeviantArt
 
+%if 0%{?with_python3}
+%package -n python3-sanction
+Summary:            A simple, lightweight OAuth2 client
+Group:              Development/Libraries
+
+%description -n python3-sanction
+python-sanction is a lightweight, dead simple client implementation of
+the OAuth2 protocol.
+
+- Variations on OAuth2 client implementation range from a few hundred LOC
+  to thousands. In a Pythonic world, there's absolutely no need for this when
+  simply dealing with the client side of the spec. Currently, sanction sits
+  at a whopping 65 LOC, one class. This makes the library tremendously easy
+  to grok.
+
+- Most providers have varying levels of diversion from the official spec.
+  The goal with this library is to either handle these diversions natively,
+  or expose a method to allow client code to deal with it efficiently and
+  effectively.
+
+- Three of the four OAuth2 flows should be supported by this library.
+  Currently, only authorization code and client credential flows have been
+  tested due to lack of other (known) implementations.
+
+sanction has been tested with the following OAuth2 providers:
+
+* Facebook (include the test API)
+* Google
+* Foursquare
+* bitly
+* GitHub
+* StackExchange
+* Instagram
+* DeviantArt
+%endif
+
+
 %prep
 %setup -q -n %{modname}-%{version}
 
 # Remove bundled egg-info in case it exists
 rm -rf %{modname}.egg-info
 
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
 %install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+popd
+%endif
+
 %{__python} setup.py install -O1 --skip-build --root=%{buildroot}
 
 %check
+%if 0%{?with_python3}
+pushd %{py3dir}
+PYTHONPATH=$(pwd) nosetests-3.3
+popd
+%endif
+
 PYTHONPATH=$(pwd) nosetests
 
 %files
@@ -64,7 +134,18 @@ PYTHONPATH=$(pwd) nosetests
 %{python_sitelib}/%{modname}/
 %{python_sitelib}/%{modname}-%{version}*
 
+%if 0%{?with_python3}
+%files -n python3-sanction
+%doc README.rst LICENSE.txt
+%{python3_sitelib}/%{modname}/
+%{python3_sitelib}/%{modname}-%{version}*
+%endif
+
 %changelog
+* Mon Oct 07 2013 Ralph Bean <rbean at redhat.com> - 0.3.1-1
+- Latest upstream.
+- Added python3 subpackage.
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1.4-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/sources b/sources
index d85054a..3d1dd01 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-45a481bb4229055fe4a0a5db0cd698b9  sanction-0.1.4.zip
+6f65800509a554e1ffb72f58358a854f  sanction-0.3.1.tar.gz


More information about the scm-commits mailing list