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