]> git.pld-linux.org Git - packages/python-wtforms.git/blob - python-wtforms.spec
- python 3.4
[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 web development
10 Summary(pl.UTF-8):      Biblioteka umożliwiająca generację i walidację formularzy html w jezyku python
11 Name:           python-%{module}
12 Version:        2.0.1
13 Release:        2
14 License:        BSD
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
21 BuildRequires:  unzip
22 %if %{with python2}
23 BuildRequires:  python-distribute
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-distribute
27 BuildRequires:  python3-modules
28 %endif
29
30 Requires:       python-modules
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 A flexible forms validation and rendering library for python web
36 development.
37
38 %description -l pl.UTF-8
39 Biblioteka umożliwiająca generację i walidację formularzy html w
40 jezyku python
41
42 %package -n python3-%{module}
43 Summary:        -
44 Summary(pl.UTF-8):      -
45 Group:          Libraries/Python
46 Requires:               python3-modules
47
48 %description -n python3-%{module}
49 A flexible forms validation and rendering library for python web
50 development.
51
52 %description -n python3-%{module} -l pl.UTF-8
53 Biblioteka umożliwiająca generację i walidację formularzy html w
54 jezyku python
55
56 %package apidocs
57 Summary:        %{module} API documentation
58 Summary(pl.UTF-8):      Dokumentacja API %{module}
59 Group:          Documentation
60
61 %description apidocs
62 API documentation for %{module}.
63
64 %description apidocs -l pl.UTF-8
65 Dokumentacja 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}
81 cd docs
82 %{__make} -j1 html
83 rm -rf _build/html/_sources
84 %endif
85
86 %install
87 rm -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
108 rm -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.067896 seconds and 3 git commands to generate.