]> git.pld-linux.org Git - packages/python-requests_cache.git/blob - python-requests_cache.spec
Release 8 (by relup.sh)
[packages/python-requests_cache.git] / python-requests_cache.spec
1 # TODO
2 # - build and package docs
3 # - tests need redis and mongo db
4 #
5 # Conditional build:
6 %bcond_with     doc     # don't build doc
7 %bcond_with     tests   # do not perform "make test"
8 %bcond_without  python2 # CPython 2.x module
9 %bcond_without  python3 # CPython 3.x module
10
11 %define         module  requests_cache
12 Summary:        Persistent cache for requests library
13 Name:           python-%{module}
14 Version:        0.4.12
15 Release:        8
16 License:        BSD
17 Group:          Libraries/Python
18 Source0:        https://github.com/reclosedev/requests-cache/archive/v%{version}/%{module}-%{version}.tar.gz
19 # Source0-md5:  11dc472117610575df875237d661c38a
20 URL:            https://github.com/reclosedev/requests-cache
21 BuildRequires:  rpm-pythonprov
22 %if %{with python2}
23 BuildRequires:  python-modules
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-requests >= 1.1.0
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-requests >= 1.1.0
34 %endif
35 %endif
36 %if %{with doc}
37 BuildRequires:  python3-sphinx
38 BuildRequires:  sphinx-pdg
39 %endif
40 Requires:       python-requests >= 1.1.0
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Requests-cache is a transparent persistent cache for the requests
46 library.
47
48 %package -n python3-%{module}
49 Summary:        Persistent cache for requests library
50 Group:          Libraries/Python
51 Requires:       python3-requests >= 1.1.0
52
53 %description -n python3-%{module}
54 Requests-cache is a transparent persistent cache for the requests
55 library.
56
57 %prep
58 %setup -q -n requests-cache-%{version}
59
60 %build
61 %if %{with python2}
62 %py_build %{?with_tests:test}
63 %endif
64
65 %if %{with python3}
66 %py3_build %{?with_tests:test}
67 %endif
68
69 %if %{with doc}
70 sphinx-build docs html
71 rm -rf html/.{doctrees,buildinfo}
72
73 sphinx-build-3 docs html
74 rm -rf html/.{doctrees,buildinfo}
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 %if %{with python2}
80 %py_install
81 %py_postclean
82 %endif
83
84 %if %{with python3}
85 %py3_install
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc README.rst LICENSE
95 %{py_sitescriptdir}/%{module}
96 %{py_sitescriptdir}/%{module}-%{version}*
97 %endif
98
99 %if %{with python3}
100 %files -n python3-%{module}
101 %defattr(644,root,root,755)
102 %doc README.rst LICENSE
103 %{py3_sitescriptdir}/%{module}
104 %{py3_sitescriptdir}/%{module}-%{version}*
105 %endif
This page took 0.100279 seconds and 3 git commands to generate.