]> git.pld-linux.org Git - packages/python-requests-oauthlib.git/blob - python-requests_oauthlib.spec
a93f1ceec28850e8fca502f3c2fe70917ff3a64f
[packages/python-requests-oauthlib.git] / python-requests_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  requests_oauthlib
6 Summary:        First-class OAuth library support for python-requests
7 Name:           python-%{module}
8 Version:        0.6.1
9 Release:        1
10 License:        ISC
11 Group:          Development/Languages/Python
12 Source0:        https://pypi.python.org/packages/source/r/requests-oauthlib/requests-oauthlib-%{version}.tar.gz
13 # Source0-md5:  f159bc7675ebe6a2d76798f4c00c5bf8
14 URL:            https://github.com/requests/requests-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 >= 1:3.2
22 %endif
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.710
25 Requires:       python-modules >= 1:2.6
26 Requires:       python-oauthlib >= 0.4.2
27 Requires:       python-requests >= 1.0.0
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 First-class OAuth library support for python-requests.
33
34 %package -n python3-requests_oauthlib
35 Summary:        First-class OAuth library support for python-requests
36 Group:          Development/Languages/Python
37 Requires:       python3-modules >= 3.2
38 Requires:       python3-oauthlib >= 0.4.2
39 Requires:       python3-requests >= 1.0.0
40
41 %description -n python3-requests_oauthlib
42 First-class OAuth library support for python-requests.
43
44 %prep
45 %setup -q -n requests-oauthlib-%{version}
46
47 %build
48 %if %{with python2}
49 %py_build
50 %endif
51
52 %if %{with python3}
53 %py3_build
54 %endif
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58
59 %if %{with python2}
60 %py_install
61
62 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
63 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
64 %py_postclean
65 %endif
66
67 %if %{with python3}
68 %py3_install
69 %endif
70
71 %{__rm} -rf $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/{cacert.pem,packages}
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %if %{with python2}
77 %files
78 %defattr(644,root,root,755)
79 %doc README.rst
80 %{py_sitescriptdir}/%{module}
81 %if "%{py_ver}" > "2.4"
82 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
83 %endif
84 %endif
85
86 %if %{with python3}
87 %files -n python3-requests_oauthlib
88 %defattr(644,root,root,755)
89 %doc README.rst
90 %{py3_sitescriptdir}/%{module}
91 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
92 %endif
This page took 0.035679 seconds and 2 git commands to generate.