]> git.pld-linux.org Git - packages/python-wtforms.git/blob - python-wtforms.spec
automatic change: use py_build/py_install macros
[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:        5
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 BuildRequires:  python-sqlalchemy
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-distribute
28 BuildRequires:  python3-modules
29 BuildRequires:  python3-sqlalchemy
30 %endif
31
32 Requires:       python-modules
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 A flexible forms validation and rendering library for python web
38 development.
39
40 %description -l pl.UTF-8
41 Biblioteka umożliwiająca generację i walidację formularzy html w
42 jezyku python
43
44 %package -n python3-%{module}
45 Summary:        -
46 Summary(pl.UTF-8):      -
47 Group:          Libraries/Python
48 Requires:               python3-modules
49
50 %description -n python3-%{module}
51 A flexible forms validation and rendering library for python web
52 development.
53
54 %description -n python3-%{module} -l pl.UTF-8
55 Biblioteka umożliwiająca generację i walidację formularzy html w
56 jezyku python
57
58 %package apidocs
59 Summary:        %{module} API documentation
60 Summary(pl.UTF-8):      Dokumentacja API %{module}
61 Group:          Documentation
62
63 %description apidocs
64 API documentation for %{module}.
65
66 %description apidocs -l pl.UTF-8
67 Dokumentacja API %{module}.
68
69
70 %prep
71 %setup -q -n WTForms-%{version}
72
73 %build
74 %if %{with python2}
75 %py_build %{?with_tests:test}
76 %endif
77
78 %if %{with python3}
79 %py3_build %{?with_tests:test}
80 %endif
81
82 %if %{with doc}
83 cd docs
84 %{__make} -j1 html
85 rm -rf _build/html/_sources
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %py_install
93
94 %py_postclean
95 %endif
96
97 %if %{with python3}
98 %py3_install
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
108 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
109 %{py_sitescriptdir}/%{module}
110 %if "%{py_ver}" > "2.4"
111 %{py_sitescriptdir}/WTForms-%{version}-py*.egg-info
112 %endif
113 %endif
114
115 %if %{with python3}
116 %files -n python3-%{module}
117 %defattr(644,root,root,755)
118 %doc AUTHORS.txt CHANGES.rst LICENSE.txt README.md
119 %{py3_sitescriptdir}/%{module}
120 %{py3_sitescriptdir}/WTForms-%{version}-py*.egg-info
121 %endif
122
123 %if %{with doc}
124 %files apidocs
125 %defattr(644,root,root,755)
126 %doc docs/_build/html/*
127 %endif
128
129
This page took 0.086522 seconds and 3 git commands to generate.