]> git.pld-linux.org Git - packages/python-requests-oauthlib.git/blob - python-requests_oauthlib.spec
- release 3 (by relup.sh)
[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.5.0
9 Release:        3
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:  139a17c495fb593b5842634faf72ebb0
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.219
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 -b py2
50 %endif
51
52 %if %{with python3}
53 %py3_build -b py3
54 %endif
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58
59 %if %{with python2}
60 %{__python} setup.py \
61         build -b py2 \
62         install \
63         --skip-build \
64         --optimize=2 \
65         --root=$RPM_BUILD_ROOT
66 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
67 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
68 %py_postclean
69 %endif
70
71 %if %{with python3}
72 %{__python3} setup.py  \
73         build -b py3 \
74         install \
75         --skip-build \
76         --optimize=2 \
77         --root=$RPM_BUILD_ROOT
78 %endif
79
80 %{__rm} -rf $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/{cacert.pem,packages}
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %files
87 %defattr(644,root,root,755)
88 %doc README.rst
89 %{py_sitescriptdir}/%{module}
90 %if "%{py_ver}" > "2.4"
91 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
92 %endif
93 %endif
94
95 %if %{with python3}
96 %files -n python3-requests_oauthlib
97 %defattr(644,root,root,755)
98 %doc README.rst
99 %{py3_sitescriptdir}/%{module}
100 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
101 %endif
This page took 0.057844 seconds and 3 git commands to generate.