]> git.pld-linux.org Git - packages/python-flask-wtf.git/blob - python-flask-wtf.spec
- drop python3-distribute deps
[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-modules
36 %endif
37 Requires:       python-modules
38 Requires:       python-wtforms >= 2.0
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Simple integration of Flask and WTForms, including CSRF, file upload
44 and Recaptcha integration.
45
46 %package -n python3-%{module}
47 Summary:        -
48 Summary(pl.UTF-8):      -
49 Group:          Libraries/Python
50 Requires:       python3-modules
51
52 %description -n python3-%{module}
53 Simple integration of Flask and WTForms, including CSRF, file upload
54 and Recaptcha integration.
55
56 ## %description -n python3-%{module} -l pl.UTF-8
57
58 %package apidocs
59 Summary:        %{module} API documentation
60 Summary(pl.UTF-8):      Dokumentacja API %{module}
61 Group:          Documentation
62
63 %description apidocs
64 API documentation for %{module}.
65
66 %description apidocs -l pl.UTF-8
67 Dokumentacja API %{module}.
68
69 %prep
70 %setup -q -n Flask-WTF-%{version}
71
72 %build
73 %if %{with python2}
74 %py_build %{?with_tests:test}
75 %endif
76
77 %if %{with python3}
78 %py3_build %{?with_tests:test}
79 %endif
80
81 %if %{with doc}
82 cd docs
83 %{__make} -j1 html
84 rm -rf _build/html/_sources
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %py_install
92
93 %py_postclean
94 %endif
95
96 %if %{with python3}
97 %py3_install
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc README.rst LICENSE
107 %{py_sitescriptdir}/flask_wtf
108 %if "%{py_ver}" > "2.4"
109 %{py_sitescriptdir}/Flask_WTF-%{version}-py*.egg-info
110 %endif
111 %endif
112
113 %if %{with python3}
114 %files -n python3-%{module}
115 %defattr(644,root,root,755)
116 %doc README.rst LICENSE
117 %{py3_sitescriptdir}/flask_wtf
118 %{py3_sitescriptdir}/Flask_WTF-%{version}-py*.egg-info
119 %endif
120
121 %if %{with doc}
122 %files apidocs
123 %defattr(644,root,root,755)
124 %doc docs/_build/html/*
125 %endif
126
This page took 0.071773 seconds and 3 git commands to generate.