]> git.pld-linux.org Git - packages/python-wtforms.git/blame - python-wtforms.spec
- python 3.4
[packages/python-wtforms.git] / python-wtforms.spec
CommitLineData
e6b6a62d
MK
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
9Summary: A flexible forms validation and rendering library for python web development
10Summary(pl.UTF-8): Biblioteka umożliwiająca generację i walidację formularzy html w jezyku python
11Name: python-%{module}
12Version: 2.0.1
21db80c0 13Release: 2
e6b6a62d
MK
14License: BSD
15Group: Development/Languages/Python
16Source0: http://pypi.python.org/packages/source/W/WTForms/WTForms-%{version}.zip
17# Source0-md5: aaac94c137b3cd63efeb3ded51082cde
18URL: http://wtforms.simplecodes.com/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.219
21BuildRequires: unzip
22%if %{with python2}
23BuildRequires: python-distribute
24%endif
25%if %{with python3}
26BuildRequires: python3-distribute
27BuildRequires: python3-modules
28%endif
29
30Requires: python-modules
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35A flexible forms validation and rendering library for python web
36development.
37
38%description -l pl.UTF-8
39Biblioteka umożliwiająca generację i walidację formularzy html w
40jezyku python
41
42%package -n python3-%{module}
43Summary: -
44Summary(pl.UTF-8): -
45Group: Libraries/Python
46Requires: python3-modules
47
48%description -n python3-%{module}
49A flexible forms validation and rendering library for python web
50development.
51
52%description -n python3-%{module} -l pl.UTF-8
53Biblioteka umożliwiająca generację i walidację formularzy html w
54jezyku python
55
56%package apidocs
57Summary: %{module} API documentation
58Summary(pl.UTF-8): Dokumentacja API %{module}
59Group: Documentation
60
61%description apidocs
62API documentation for %{module}.
63
64%description apidocs -l pl.UTF-8
65Dokumentacja API %{module}.
66
67
68%prep
69%setup -q -n WTForms-%{version}
70
71%build
72%if %{with python2}
73%{__python} setup.py build --build-base build-2 %{?with_tests:test}
74%endif
75
76%if %{with python3}
77%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
78%endif
79
80%if %{with doc}
81cd docs
82%{__make} -j1 html
83rm -rf _build/html/_sources
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%{__python} setup.py \
91 build --build-base build-2 \
92 install --skip-build \
93 --optimize=2 \
94 --root=$RPM_BUILD_ROOT
95
96%py_postclean
97%endif
98
99%if %{with python3}
100%{__python3} setup.py \
101 build --build-base build-3 \
102 install --skip-build \
103 --optimize=2 \
104 --root=$RPM_BUILD_ROOT
105%endif
106
107%clean
108rm -rf $RPM_BUILD_ROOT
109
110%if %{with python2}
111%files
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
118%endif
119%endif
120
121%if %{with python3}
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
127%endif
128
129%if %{with doc}
130%files apidocs
131%defattr(644,root,root,755)
132%doc docs/_build/html/*
133%endif
134
135
This page took 0.103771 seconds and 4 git commands to generate.