3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: A flexible forms validation and rendering library for Python 2 web development
10 Summary(pl.UTF-8): Elastyczna biblioteka do generowania i walidacji formularzy WWW w Pythonie 2
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 #Source0Download: https://pypi.org/simple/wtforms/
17 Source0: https://github.com/wtforms/wtforms/archive/%{version}/%{module}-%{version}.tar.gz
18 # Source0-md5: b43b08c4fc5c8f9fc1b980e939a71811
19 URL: http://wtforms.simplecodes.com/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.710
24 BuildRequires: python-modules >= 1:2.6
25 BuildRequires: python-setuptools
27 BuildRequires: python-babel >= 1.3
28 %if %(test -f %{py_sitescriptdir}/babel/locale-data/de_CH.dat; echo $?)
29 BuildRequires: python-babel(with_locale:de_CH)
31 %if %(test -f %{py_sitescriptdir}/babel/locale-data/de_DE.dat; echo $?)
32 BuildRequires: python-babel(with_locale:de_DE)
34 %if %(test -f %{py_sitescriptdir}/babel/locale-data/es_ES.dat; echo $?)
35 BuildRequires: python-babel(with_locale:es_ES)
37 %if %(test -f %{py_sitescriptdir}/babel/locale-data/en_US.dat; echo $?)
38 BuildRequires: python-babel(with_locale:en_US)
40 %if %(test -f %{py_sitescriptdir}/babel/locale-data/hi_IN.dat; echo $?)
41 BuildRequires: python-babel(with_locale:hi_IN)
43 BuildRequires: python-sqlalchemy
44 %if "%{py_ver}" < "2.7"
45 BuildRequires: python-ordereddict
50 BuildRequires: python3-modules >= 1:3.3
51 BuildRequires: python3-setuptools
53 BuildRequires: python3-babel >= 1.3
54 %if %(test -f %{py3_sitescriptdir}/babel/locale-data/de_CH.dat; echo $?)
55 BuildRequires: python3-babel(with_locale:de_CH)
57 %if %(test -f %{py3_sitescriptdir}/babel/locale-data/de_DE.dat; echo $?)
58 BuildRequires: python3-babel(with_locale:de_DE)
60 %if %(test -f %{py3_sitescriptdir}/babel/locale-data/es_ES.dat; echo $?)
61 BuildRequires: python3-babel(with_locale:es_ES)
63 %if %(test -f %{py3_sitescriptdir}/babel/locale-data/en_US.dat; echo $?)
64 BuildRequires: python3-babel(with_locale:en_US)
66 %if %(test -f %{py3_sitescriptdir}/babel/locale-data/hi_IN.dat; echo $?)
67 BuildRequires: python3-babel(with_locale:hi_IN)
69 BuildRequires: python3-sqlalchemy
70 BuildRequires: %{py3_sitescriptdir}/babel/locale-data/de_CH.dat
71 BuildRequires: %{py3_sitescriptdir}/babel/locale-data/de_DE.dat
72 BuildRequires: %{py3_sitescriptdir}/babel/locale-data/es_ES.dat
73 BuildRequires: %{py3_sitescriptdir}/babel/locale-data/hi_IN.dat
76 Requires: python-modules >= 1:2.6
78 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81 A flexible forms validation and rendering library for Python web
84 %description -l pl.UTF-8
85 Elastyczna biblioteka do skadania i kontroli poprawności formularzy
88 %package -n python3-%{module}
89 Summary: A flexible forms validation and rendering library for Python 3 web development
90 Summary(pl.UTF-8): Elastyczna biblioteka do generowania i walidacji formularzy WWW w Pythonie 3
91 Group: Libraries/Python
92 Requires: python3-modules >= 1:3.3
94 %description -n python3-%{module}
95 A flexible forms validation and rendering library for python web
98 %description -n python3-%{module} -l pl.UTF-8
99 Elastyczna biblioteka do skadania i kontroli poprawności formularzy
103 Summary: API documentation for Python WTForms module
104 Summary(pl.UTF-8): Dokumentacja API modułu Pythona WTForms
108 API documentation for Python WTForms module.
110 %description apidocs -l pl.UTF-8
111 Dokumentacja API modułu Pythona WTForms.
114 %setup -q -n %{module}-%{version}
116 # disable failing test
117 %{__sed} -i "/OPTIONAL_TESTS/ s/'ext_django\.tests', //" tests/runtests.py
124 %{__python} tests/runtests.py
132 %{__python3} tests/runtests.py
137 %{__make} -C docs -j1 html
141 rm -rf $RPM_BUILD_ROOT
154 rm -rf $RPM_BUILD_ROOT
158 %defattr(644,root,root,755)
159 %doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
160 %{py_sitescriptdir}/%{module}
161 %{py_sitescriptdir}/WTForms-%{version}-py*.egg-info
165 %files -n python3-%{module}
166 %defattr(644,root,root,755)
167 %doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
168 %{py3_sitescriptdir}/%{module}
169 %{py3_sitescriptdir}/WTForms-%{version}-py*.egg-info
174 %defattr(644,root,root,755)
175 %doc docs/_build/html/{_static,*.html,*.js}