]> git.pld-linux.org Git - packages/python-oauthlib.git/blob - python-oauthlib.spec
- up to 1.0.3
[packages/python-oauthlib.git] / python-oauthlib.spec
1 # Conditional build:
2 %bcond_without  python2         # build python 2 module
3 %bcond_without  python3         # build python 3 module
4 #
5 %define         module  oauthlib
6 Summary:        A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
7 Name:           python-%{module}
8 Version:        1.0.3
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages/Python
12 Source0:        https://pypi.python.org/packages/source/o/oauthlib/%{module}-%{version}.tar.gz
13 # Source0-md5:  02772867bf246b3b37f4ed22786c41f5
14 URL:            https://pypi.python.org/pypi/oauthlib
15 %if %{with python2}
16 BuildRequires:  python-distribute
17 BuildRequires:  python-modules >= 1:2.6
18 %endif
19 %if %{with python3}
20 BuildRequires:  python3-distribute
21 BuildRequires:  python3-modules >= 3.2
22 %endif
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.219
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 OAuthLib is a generic utility which implements the logic of OAuth
30 without assuming a specific HTTP request object. Use it to graft OAuth
31 support onto your favorite HTTP library. If you're a maintainer of
32 such a library, write a thin veneer on top of OAuthLib and get OAuth
33 support for very little effort.
34
35 %package -n python3-oauthlib
36 Summary:        A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
37 Group:          Development/Languages/Python
38
39 %description -n python3-oauthlib
40 OAuthLib is a generic utility which implements the logic of OAuth
41 without assuming a specific HTTP request object. Use it to graft OAuth
42 support onto your favorite HTTP library. If you're a maintainer of
43 such a library, write a thin veneer on top of OAuthLib and get OAuth
44 support 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
59 rm -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
85 rm -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.142498 seconds and 4 git commands to generate.