]> git.pld-linux.org Git - packages/python-flask-login.git/blob - python-flask-login.spec
- doc BR
[packages/python-flask-login.git] / python-flask-login.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_with     python3 # CPython 3.x module
7
8 %define         module  flask-login
9 Summary:        Flask-Login provides user session management for Flask
10 Summary(pl.UTF-8):      Obsługa zarządzania sesją użytkownika w aplikacjach Flask
11 Name:           python-%{module}
12 # keep python2 compatible version (0.5.x) here
13 Version:        0.5.0
14 Release:        7
15 License:        MIT
16 Group:          Libraries/Python
17 Source0:        https://files.pythonhosted.org/packages/source/F/Flask-Login/Flask-Login-%{version}.tar.gz
18 # Source0-md5:  a2d94aa6ae935345ebc68eb3cbb5fccd
19 URL:            https://github.com/maxcountryman/flask-login/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-flask
25 BuildRequires:  python-semantic_version
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.5
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-flask
33 BuildRequires:  python3-semantic_version
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 %if %{with doc}
39 BuildRequires:  sphinx-pdg-2
40 %endif
41 Requires:       python-modules >= 1:2.7
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 Flask-Login provides user session management for Flask. It handles the
47 common tasks of logging in, logging out, and remembering your users'
48 sessions over extended periods of time.
49
50 %description -l pl.UTF-8
51 Obsługa zarządzania sesją użytkownika w aplikacjach Flask. Wtyczka
52 obsługuje najpopularniejsze przypadki użycia: logowanie, wylogowanie,
53 zapamiętywanie sesji użytkowników przez określony czas.
54
55 %package -n python3-%{module}
56 Summary:        Flask-Login provides user session management for Flask
57 Summary(pl.UTF-8):      Obsługa zarządzania sesją użytkownika w aplikacjach Flask
58 Group:          Libraries/Python
59 Requires:       python3-modules >= 1:3.5
60
61 %description -n python3-%{module}
62 Flask-Login provides user session management for Flask. It handles the
63 common tasks of logging in, logging out, and remembering your users'
64 sessions over extended periods of time.
65
66 %description -n python3-%{module} -l pl.UTF-8
67 Obsługa zarządzania sesją użytkownika w aplikacjach Flask. Wtyczka
68 obsługuje najpopularniejsze przypadki użycia: logowanie, wylogowanie,
69 zapamiętywanie sesji użytkowników przez określony czas.
70
71 %package apidocs
72 Summary:        API documentation for Python Flask-Login module
73 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona Flask-Login
74 Group:          Documentation
75
76 %description apidocs
77 API documentation for Python Flask-Login module.
78
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona Flask-Login.
81
82 %prep
83 %setup -q -n Flask-Login-%{version}
84
85 %build
86 %if %{with python2}
87 %py_build
88
89 %if %{with tests}
90 %{__python} -m unittest test_login
91 %endif
92 %endif
93
94 %if %{with python3}
95 %py3_build
96
97 %if %{with tests}
98 %{__python3} -m unittest test_login
99 %endif
100 %endif
101
102 %if %{with doc}
103 PYTHONPATH=$(pwd) \
104 %{__make} -C docs html \
105         SPHINXBUILD=sphinx-build-2
106 %endif
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110
111 %if %{with python2}
112 %py_install
113
114 %py_postclean
115 %endif
116
117 %if %{with python3}
118 %py3_install
119 %endif
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %if %{with python2}
125 %files
126 %defattr(644,root,root,755)
127 %doc README.md LICENSE
128 %{py_sitescriptdir}/flask_login
129 %{py_sitescriptdir}/Flask_Login-%{version}-py*.egg-info
130 %endif
131
132 %if %{with python3}
133 %files -n python3-%{module}
134 %defattr(644,root,root,755)
135 %doc README.md LICENSE
136 %{py3_sitescriptdir}/flask_login
137 %{py3_sitescriptdir}/Flask_Login-%{version}-py*.egg-info
138 %endif
139
140 %if %{with doc}
141 %files apidocs
142 %defattr(644,root,root,755)
143 %doc docs/_build/html/{_static,*.html,*.js}
144 %endif
This page took 0.105797 seconds and 3 git commands to generate.