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