]> git.pld-linux.org Git - packages/python-oauthlib.git/blame - python-oauthlib.spec
- release 2 (by relup.sh)
[packages/python-oauthlib.git] / python-oauthlib.spec
CommitLineData
ed0588c6
JK
1# Conditional build:
2%bcond_without python2 # build python 2 module
3%bcond_without python3 # build python 3 module
4#
5%define module oauthlib
6Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
7Name: python-%{module}
390542ff 8Version: 1.0.3
a6f159f7 9Release: 2
ed0588c6
JK
10License: BSD
11Group: Development/Languages/Python
12Source0: https://pypi.python.org/packages/source/o/oauthlib/%{module}-%{version}.tar.gz
390542ff 13# Source0-md5: 02772867bf246b3b37f4ed22786c41f5
ed0588c6
JK
14URL: https://pypi.python.org/pypi/oauthlib
15%if %{with python2}
16BuildRequires: python-distribute
17BuildRequires: python-modules >= 1:2.6
18%endif
19%if %{with python3}
20BuildRequires: python3-distribute
21BuildRequires: python3-modules >= 3.2
22%endif
23BuildRequires: rpm-pythonprov
24BuildRequires: rpmbuild(macros) >= 1.219
25BuildArch: noarch
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29OAuthLib is a generic utility which implements the logic of OAuth
30without assuming a specific HTTP request object. Use it to graft OAuth
31support onto your favorite HTTP library. If you're a maintainer of
32such a library, write a thin veneer on top of OAuthLib and get OAuth
33support for very little effort.
34
35%package -n python3-oauthlib
36Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
37Group: Development/Languages/Python
38
39%description -n python3-oauthlib
40OAuthLib is a generic utility which implements the logic of OAuth
41without assuming a specific HTTP request object. Use it to graft OAuth
42support onto your favorite HTTP library. If you're a maintainer of
43such a library, write a thin veneer on top of OAuthLib and get OAuth
44support for very little effort.
45
46%prep
47%setup -q -n %{module}-%{version}
48
49%build
50%if %{with python2}
51%{__python} setup.py build -b py2
52%endif
53
54%if %{with python3}
55%{__python3} setup.py build -b py3
56%endif
57
58%install
59rm -rf $RPM_BUILD_ROOT
60
61%if %{with python2}
62%{__python} setup.py \
63 build -b py2 \
64 install \
65 --skip-build \
66 --optimize=2 \
67 --root=$RPM_BUILD_ROOT
68%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
69%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
70%py_postclean
71%endif
72
73%if %{with python3}
74%{__python3} setup.py \
75 build -b py3 \
76 install \
77 --skip-build \
78 --optimize=2 \
79 --root=$RPM_BUILD_ROOT
80%endif
81
82%{__rm} -rf $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/{cacert.pem,packages}
83
84%clean
85rm -rf $RPM_BUILD_ROOT
86
87%if %{with python2}
88%files
89%defattr(644,root,root,755)
90%doc README.rst
91%{py_sitescriptdir}/%{module}
92%if "%{py_ver}" > "2.4"
93%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
94%endif
95%endif
96
97%if %{with python3}
98%files -n python3-oauthlib
99%defattr(644,root,root,755)
100%doc README.rst
101%{py3_sitescriptdir}/%{module}
102%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
103%endif
This page took 0.100125 seconds and 4 git commands to generate.