]> git.pld-linux.org Git - packages/python-flask-wtf.git/blob - python-flask-wtf.spec
c99bf0d01eabce804677a67d1904b5c0792a0352
[packages/python-flask-wtf.git] / python-flask-wtf.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # don't build doc
4 %bcond_with     tests   # do not perform "make test"
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  flask-wtf
9 Summary:        Simple integration of Flask and WTForms
10 Name:           python-%{module}
11 Version:        0.10.2
12 Release:        8
13 License:        BSD
14 Group:          Development/Languages/Python
15 Source0:        http://pypi.python.org/packages/source/F/Flask-WTF/Flask-WTF-%{version}.tar.gz
16 # Source0-md5:  2932ac0e7e8df26f6efb6ee7e6cfb783
17 URL:            http://github.com/rduplain/flask-wtf
18 BuildRequires:  python-flask
19 %if %{with tests}
20 BuildRequires:  python-Flask-Testing
21 BuildRequires:  python-Flask-Uploads
22 BuildRequires:  python-nose
23 %endif
24
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.710
27 %if %{with python2}
28 BuildRequires:  python-devel
29 BuildRequires:  python-distribute
30 BuildRequires:  python-wtforms >= 2.0
31
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-devel
35 BuildRequires:  python3-distribute
36 BuildRequires:  python3-modules
37 %endif
38 Requires:       python-modules
39 Requires:       python-wtforms >= 2.0
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Simple integration of Flask and WTForms, including CSRF, file upload
45 and Recaptcha integration.
46
47 %package -n python3-%{module}
48 Summary:        -
49 Summary(pl.UTF-8):      -
50 Group:          Libraries/Python
51 Requires:       python3-modules
52
53 %description -n python3-%{module}
54 Simple integration of Flask and WTForms, including CSRF, file upload
55 and Recaptcha integration.
56
57 ## %description -n python3-%{module} -l pl.UTF-8
58
59 %package apidocs
60 Summary:        %{module} API documentation
61 Summary(pl.UTF-8):      Dokumentacja API %{module}
62 Group:          Documentation
63
64 %description apidocs
65 API documentation for %{module}.
66
67 %description apidocs -l pl.UTF-8
68 Dokumentacja API %{module}.
69
70 %prep
71 %setup -q -n Flask-WTF-%{version}
72
73 %build
74 %if %{with python2}
75 %py_build %{?with_tests:test}
76 %endif
77
78 %if %{with python3}
79 %py3_build %{?with_tests:test}
80 %endif
81
82 %if %{with doc}
83 cd docs
84 %{__make} -j1 html
85 rm -rf _build/html/_sources
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %py_install
93
94 %py_postclean
95 %endif
96
97 %if %{with python3}
98 %py3_install
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc README.rst LICENSE
108 %{py_sitescriptdir}/flask_wtf
109 %if "%{py_ver}" > "2.4"
110 %{py_sitescriptdir}/Flask_WTF-%{version}-py*.egg-info
111 %endif
112 %endif
113
114 %if %{with python3}
115 %files -n python3-%{module}
116 %defattr(644,root,root,755)
117 %doc README.rst LICENSE
118 %{py3_sitescriptdir}/flask_wtf
119 %{py3_sitescriptdir}/Flask_WTF-%{version}-py*.egg-info
120 %endif
121
122 %if %{with doc}
123 %files apidocs
124 %defattr(644,root,root,755)
125 %doc docs/_build/html/*
126 %endif
127
This page took 0.269889 seconds and 2 git commands to generate.