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 web development
10 Summary(pl.UTF-8): Biblioteka umożliwiająca generację i walidację formularzy html w jezyku python
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 Source0: http://pypi.python.org/packages/source/W/WTForms/WTForms-%{version}.zip
17 # Source0-md5: aaac94c137b3cd63efeb3ded51082cde
18 URL: http://wtforms.simplecodes.com/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.219
23 BuildRequires: python-distribute
26 BuildRequires: python3-distribute
27 BuildRequires: python3-modules
30 Requires: python-modules
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 A flexible forms validation and rendering library for python web
38 %description -l pl.UTF-8
39 Biblioteka umożliwiająca generację i walidację formularzy html w
42 %package -n python3-%{module}
45 Group: Libraries/Python
46 Requires: python3-modules
48 %description -n python3-%{module}
49 A flexible forms validation and rendering library for python web
52 %description -n python3-%{module} -l pl.UTF-8
53 Biblioteka umożliwiająca generację i walidację formularzy html w
57 Summary: %{module} API documentation
58 Summary(pl.UTF-8): Dokumentacja API %{module}
62 API documentation for %{module}.
64 %description apidocs -l pl.UTF-8
65 Dokumentacja API %{module}.
69 %setup -q -n WTForms-%{version}
73 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
77 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
83 rm -rf _build/html/_sources
87 rm -rf $RPM_BUILD_ROOT
90 %{__python} setup.py \
91 build --build-base build-2 \
92 install --skip-build \
94 --root=$RPM_BUILD_ROOT
100 %{__python3} setup.py \
101 build --build-base build-3 \
102 install --skip-build \
104 --root=$RPM_BUILD_ROOT
108 rm -rf $RPM_BUILD_ROOT
112 %defattr(644,root,root,755)
113 %doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
114 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
115 %{py_sitescriptdir}/%{module}
116 %if "%{py_ver}" > "2.4"
117 %{py_sitescriptdir}/WTForms-%{version}-py*.egg-info
122 %files -n python3-%{module}
123 %defattr(644,root,root,755)
124 %doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
125 %{py3_sitescriptdir}/%{module}
126 %{py3_sitescriptdir}/WTForms-%{version}-py*.egg-info
131 %defattr(644,root,root,755)
132 %doc docs/_build/html/*