]> git.pld-linux.org Git - packages/python-wtforms.git/blame - python-wtforms.spec
- rebuild with python 3.8
[packages/python-wtforms.git] / python-wtforms.spec
CommitLineData
e6b6a62d
MK
1#
2# Conditional build:
27c5a0ad 3%bcond_without doc # don't build doc
e6b6a62d
MK
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
7
8%define module wtforms
27c5a0ad
JB
9Summary: A flexible forms validation and rendering library for Python 2 web development
10Summary(pl.UTF-8): Elastyczna biblioteka do generowania i walidacji formularzy WWW w Pythonie 2
e6b6a62d 11Name: python-%{module}
27c5a0ad 12Version: 2.1
1e99814f 13Release: 3
e6b6a62d
MK
14License: BSD
15Group: Development/Languages/Python
27c5a0ad
JB
16#Source0Download: https://pypi.org/simple/wtforms/
17Source0: https://files.pythonhosted.org/packages/source/W/WTForms/WTForms-%{version}.zip
18# Source0-md5: 6938a541fafd1a1ae2f6b9b88588eef2
19Patch0: %{name}-tests.patch
e6b6a62d
MK
20URL: http://wtforms.simplecodes.com/
21BuildRequires: rpm-pythonprov
81c0553a 22BuildRequires: rpmbuild(macros) >= 1.710
e6b6a62d
MK
23BuildRequires: unzip
24%if %{with python2}
27c5a0ad
JB
25BuildRequires: python-modules >= 1:2.6
26BuildRequires: python-setuptools
27%if %{with tests}
28BuildRequires: python-babel >= 1.3
29%if %(test -f %{py_sitescriptdir}/babel/locale-data/de_CH.dat; echo $?)
30BuildRequires: python-babel(with_locale:de_CH)
31%endif
32%if %(test -f %{py_sitescriptdir}/babel/locale-data/de_DE.dat; echo $?)
33BuildRequires: python-babel(with_locale:de_DE)
34%endif
35%if %(test -f %{py_sitescriptdir}/babel/locale-data/es_ES.dat; echo $?)
36BuildRequires: python-babel(with_locale:es_ES)
37%endif
38%if %(test -f %{py_sitescriptdir}/babel/locale-data/en_US.dat; echo $?)
39BuildRequires: python-babel(with_locale:en_US)
40%endif
41%if %(test -f %{py_sitescriptdir}/babel/locale-data/hi_IN.dat; echo $?)
42BuildRequires: python-babel(with_locale:hi_IN)
43%endif
7d4dd796 44BuildRequires: python-sqlalchemy
27c5a0ad
JB
45%if "%{py_ver}" < "2.7"
46BuildRequires: python-ordereddict
47%endif
48%endif
e6b6a62d
MK
49%endif
50%if %{with python3}
27c5a0ad
JB
51BuildRequires: python3-modules >= 1:3.3
52BuildRequires: python3-setuptools
53%if %{with tests}
54BuildRequires: python3-babel >= 1.3
55%if %(test -f %{py3_sitescriptdir}/babel/locale-data/de_CH.dat; echo $?)
56BuildRequires: python3-babel(with_locale:de_CH)
57%endif
58%if %(test -f %{py3_sitescriptdir}/babel/locale-data/de_DE.dat; echo $?)
59BuildRequires: python3-babel(with_locale:de_DE)
60%endif
61%if %(test -f %{py3_sitescriptdir}/babel/locale-data/es_ES.dat; echo $?)
62BuildRequires: python3-babel(with_locale:es_ES)
63%endif
64%if %(test -f %{py3_sitescriptdir}/babel/locale-data/en_US.dat; echo $?)
65BuildRequires: python3-babel(with_locale:en_US)
66%endif
67%if %(test -f %{py3_sitescriptdir}/babel/locale-data/hi_IN.dat; echo $?)
68BuildRequires: python3-babel(with_locale:hi_IN)
69%endif
7d4dd796 70BuildRequires: python3-sqlalchemy
27c5a0ad
JB
71BuildRequires: %{py3_sitescriptdir}/babel/locale-data/de_CH.dat
72BuildRequires: %{py3_sitescriptdir}/babel/locale-data/de_DE.dat
73BuildRequires: %{py3_sitescriptdir}/babel/locale-data/es_ES.dat
74BuildRequires: %{py3_sitescriptdir}/babel/locale-data/hi_IN.dat
e6b6a62d 75%endif
27c5a0ad
JB
76%endif
77Requires: python-modules >= 1:2.6
e6b6a62d
MK
78BuildArch: noarch
79BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80
81%description
27c5a0ad 82A flexible forms validation and rendering library for Python web
e6b6a62d
MK
83development.
84
85%description -l pl.UTF-8
27c5a0ad
JB
86Elastyczna biblioteka do skadania i kontroli poprawności formularzy
87WWW w Pythonie.
e6b6a62d
MK
88
89%package -n python3-%{module}
27c5a0ad
JB
90Summary: A flexible forms validation and rendering library for Python 3 web development
91Summary(pl.UTF-8): Elastyczna biblioteka do generowania i walidacji formularzy WWW w Pythonie 3
e6b6a62d 92Group: Libraries/Python
27c5a0ad 93Requires: python3-modules >= 1:3.3
e6b6a62d
MK
94
95%description -n python3-%{module}
96A flexible forms validation and rendering library for python web
97development.
98
99%description -n python3-%{module} -l pl.UTF-8
27c5a0ad
JB
100Elastyczna biblioteka do skadania i kontroli poprawności formularzy
101WWW w Pythonie.
e6b6a62d
MK
102
103%package apidocs
27c5a0ad
JB
104Summary: API documentation for Python WTForms module
105Summary(pl.UTF-8): Dokumentacja API modułu Pythona WTForms
e6b6a62d
MK
106Group: Documentation
107
108%description apidocs
27c5a0ad 109API documentation for Python WTForms module.
e6b6a62d
MK
110
111%description apidocs -l pl.UTF-8
27c5a0ad 112Dokumentacja API modułu Pythona WTForms.
e6b6a62d
MK
113
114%prep
115%setup -q -n WTForms-%{version}
27c5a0ad
JB
116%patch0 -p1
117
118# disable failing test
119%{__sed} -i "/OPTIONAL_TESTS/ s/'ext_django\.tests', //" tests/runtests.py
e6b6a62d
MK
120
121%build
122%if %{with python2}
27c5a0ad
JB
123%py_build
124
125%if %{with tests}
126%{__python} tests/runtests.py
127%endif
e6b6a62d
MK
128%endif
129
130%if %{with python3}
27c5a0ad
JB
131%py3_build
132
133%if %{with tests}
134%{__python3} tests/runtests.py
135%endif
e6b6a62d
MK
136%endif
137
138%if %{with doc}
27c5a0ad 139%{__make} -C docs -j1 html
e6b6a62d
MK
140%endif
141
142%install
143rm -rf $RPM_BUILD_ROOT
144
145%if %{with python2}
583220b6 146%py_install
e6b6a62d
MK
147
148%py_postclean
149%endif
150
151%if %{with python3}
583220b6 152%py3_install
e6b6a62d
MK
153%endif
154
155%clean
156rm -rf $RPM_BUILD_ROOT
157
158%if %{with python2}
159%files
160%defattr(644,root,root,755)
161%doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
e6b6a62d 162%{py_sitescriptdir}/%{module}
e6b6a62d
MK
163%{py_sitescriptdir}/WTForms-%{version}-py*.egg-info
164%endif
e6b6a62d
MK
165
166%if %{with python3}
167%files -n python3-%{module}
168%defattr(644,root,root,755)
169%doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
170%{py3_sitescriptdir}/%{module}
171%{py3_sitescriptdir}/WTForms-%{version}-py*.egg-info
172%endif
173
174%if %{with doc}
175%files apidocs
176%defattr(644,root,root,755)
27c5a0ad 177%doc docs/_build/html/{_static,*.html,*.js}
e6b6a62d 178%endif
This page took 0.106085 seconds and 4 git commands to generate.