]> git.pld-linux.org Git - packages/python-flask-wtf.git/blob - python-flask-wtf.spec
- Version 0.10.2. python3 packages added.
[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:        1
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.219
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 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
76 %endif
77
78 %if %{with python3}
79 %{__python3} setup.py build --build-base build-3 %{?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 %{__python} setup.py \
93         build --build-base build-2 \
94         install --skip-build \
95         --optimize=2 \
96         --root=$RPM_BUILD_ROOT
97
98 %py_postclean
99 %endif
100
101 %if %{with python3}
102 %{__python3} setup.py \
103         build --build-base build-3 \
104         install --skip-build \
105         --optimize=2 \
106         --root=$RPM_BUILD_ROOT
107 %endif
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %files
114 %defattr(644,root,root,755)
115 %doc README.rst LICENSE
116 %{py_sitescriptdir}/flask_wtf
117 %if "%{py_ver}" > "2.4"
118 %{py_sitescriptdir}/Flask_WTF-%{version}-py*.egg-info
119 %endif
120 %endif
121
122 %if %{with python3}
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc README.rst LICENSE
126 %{py3_sitescriptdir}/flask_wtf
127 %{py3_sitescriptdir}/Flask_WTF-%{version}-py*.egg-info
128 %endif
129
130 %if %{with doc}
131 %files apidocs
132 %defattr(644,root,root,755)
133 %doc docs/_build/html/*
134 %endif
135
This page took 0.083543 seconds and 3 git commands to generate.