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