]> git.pld-linux.org Git - packages/python-flask-login.git/blame - python-flask-login.spec
- finished package, added tests and apidocs
[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
f0c1e36b 14Release: 6
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
38Requires: python-modules >= 1:2.7
44af3ef0
MK
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43Flask-Login provides user session management for Flask. It handles the
44common tasks of logging in, logging out, and remembering your users'
45sessions over extended periods of time.
46
47%description -l pl.UTF-8
e88f3cee
JB
48Obsługa zarządzania sesją użytkownika w aplikacjach Flask. Wtyczka
49obsługuje najpopularniejsze przypadki użycia: logowanie, wylogowanie,
50zapamiętywanie sesji użytkowników przez określony czas.
44af3ef0
MK
51
52%package -n python3-%{module}
53Summary: Flask-Login provides user session management for Flask
e88f3cee 54Summary(pl.UTF-8): Obsługa zarządzania sesją użytkownika w aplikacjach Flask
44af3ef0 55Group: Libraries/Python
e88f3cee 56Requires: python3-modules >= 1:3.5
44af3ef0
MK
57
58%description -n python3-%{module}
59Flask-Login provides user session management for Flask. It handles the
60common tasks of logging in, logging out, and remembering your users'
61sessions over extended periods of time.
62
63%description -n python3-%{module} -l pl.UTF-8
e88f3cee
JB
64Obsługa zarządzania sesją użytkownika w aplikacjach Flask. Wtyczka
65obsługuje najpopularniejsze przypadki użycia: logowanie, wylogowanie,
66zapamiętywanie sesji użytkowników przez określony czas.
67
68%package apidocs
69Summary: API documentation for Python Flask-Login module
70Summary(pl.UTF-8): Dokumentacja API modułu Pythona Flask-Login
71Group: Documentation
72
73%description apidocs
74API documentation for Python Flask-Login module.
75
76%description apidocs -l pl.UTF-8
77Dokumentacja API modułu Pythona Flask-Login.
44af3ef0
MK
78
79%prep
80%setup -q -n Flask-Login-%{version}
81
82%build
83%if %{with python2}
38d6fd04 84%py_build
e88f3cee
JB
85
86%if %{with tests}
87%{__python} -m unittest test_login
88%endif
44af3ef0
MK
89%endif
90
91%if %{with python3}
38d6fd04 92%py3_build
e88f3cee
JB
93
94%if %{with tests}
95%{__python3} -m unittest test_login
96%endif
97%endif
98
99%if %{with doc}
100PYTHONPATH=$(pwd) \
101%{__make} -C docs html \
102 SPHINXBUILD=sphinx-build-2
44af3ef0
MK
103%endif
104
105%install
106rm -rf $RPM_BUILD_ROOT
107
108%if %{with python2}
38d6fd04 109%py_install
44af3ef0
MK
110
111%py_postclean
112%endif
113
114%if %{with python3}
38d6fd04 115%py3_install
44af3ef0
MK
116%endif
117
118%clean
119rm -rf $RPM_BUILD_ROOT
120
121%if %{with python2}
122%files
123%defattr(644,root,root,755)
8d90d76c
AM
124%doc README.md LICENSE
125%{py_sitescriptdir}/flask_login
44af3ef0
MK
126%{py_sitescriptdir}/Flask_Login-%{version}-py*.egg-info
127%endif
44af3ef0
MK
128
129%if %{with python3}
130%files -n python3-%{module}
131%defattr(644,root,root,755)
8d90d76c
AM
132%doc README.md LICENSE
133%{py3_sitescriptdir}/flask_login
44af3ef0
MK
134%{py3_sitescriptdir}/Flask_Login-%{version}-py*.egg-info
135%endif
136
e88f3cee
JB
137%if %{with doc}
138%files apidocs
139%defattr(644,root,root,755)
140%doc docs/_build/html/{_static,*.html,*.js}
141%endif
This page took 0.142324 seconds and 4 git commands to generate.