]>
Commit | Line | Data |
---|---|---|
463e6935 ER |
1 | # |
2 | # TODO | |
3 | # - use system tiny_mce package | |
4 | # - jquery, jquery-ui | |
5 | ||
6 | # Conditional build: | |
7 | %bcond_with tests # do not perform "make test" | |
8 | ||
9 | %define module deform | |
10 | Summary: Python HTML form generation library | |
11 | Name: python-%{module} | |
12 | Version: 0.9.6 | |
7721e5df | 13 | Release: 3 |
463e6935 ER |
14 | # Some CSS and code (in the static directory) is provided via a Creative Commons license. (see LICENSE.txt) |
15 | License: BSD-derived (http://www.repoze.org/LICENSE.txt), CC BY 3.0 (assets) | |
16 | Group: Libraries/Python | |
17 | Source0: http://pypi.python.org/packages/source/d/deform/%{module}-%{version}.tar.gz | |
18 | # Source0-md5: faf9054ad7c89457fe3ae1e3c0c15b97 | |
19 | URL: http://docs.pylonsproject.org/projects/deform/ | |
20 | BuildRequires: python-distribute | |
21 | BuildRequires: rpm-pythonprov | |
650ef335 | 22 | BuildRequires: rpmbuild(macros) >= 1.710 |
463e6935 | 23 | Requires: python-modules |
f990fa8b | 24 | Requires: python-peppercorn >= 0.3 |
463e6935 ER |
25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | deform is a Python HTML form generation library. | |
30 | ||
31 | The design of deform is heavily influenced by the formish form | |
32 | generation library. Some might even say it's a shameless rip-off; this | |
33 | would not be completely inaccurate. It differs from formish mostly in | |
34 | ways that make the implementation (arguably) simpler and smaller. | |
35 | ||
36 | deform uses Colander as a schema library, Peppercorn as a form control | |
37 | deserialization library, and Chameleon to perform HTML templating. | |
38 | ||
39 | deform depends only on Peppercorn, Colander, Chameleon and an | |
40 | internationalization library named translationstring, so it may be | |
41 | used in most web frameworks (or antiframeworks) as a result. | |
42 | ||
43 | Alternate templating languages may be used, as long as all templates | |
44 | are translated from the native Chameleon templates to your templating | |
45 | system of choice and a suitable renderer is supplied to deform. | |
46 | ||
47 | %prep | |
48 | %setup -q -n %{module}-%{version} | |
49 | ||
50 | %build | |
d7236155 | 51 | %py_build |
463e6935 ER |
52 | |
53 | %{?with_tests:%{__python} setup.py test} | |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
d7236155 | 57 | %py_install |
463e6935 ER |
58 | |
59 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests | |
60 | %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale/%{module}.pot | |
61 | %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale/*/LC_MESSAGES/%{module}.po | |
62 | ||
63 | install -d $RPM_BUILD_ROOT%{_localedir} | |
64 | mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/%{module}/locale/*,%{_localedir}} | |
65 | rmdir $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale | |
66 | # TODO: patch that the symlink won't be needed | |
67 | ln -s %{_localedir} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale | |
68 | ||
f990fa8b | 69 | mv $RPM_BUILD_ROOT%{_localedir}/{de_DE,de} |
463e6935 ER |
70 | |
71 | %find_lang %{module} | |
72 | ||
73 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
74 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
75 | %py_postclean | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %files -f %{module}.lang | |
81 | %defattr(644,root,root,755) | |
82 | %doc CHANGES.txt LICENSE.txt README.txt RESEARCH.txt TODO.txt | |
83 | %dir %{py_sitescriptdir}/%{module} | |
84 | %{py_sitescriptdir}/%{module}/*.py[co] | |
85 | %{py_sitescriptdir}/%{module}-%{version}*.egg-info | |
86 | %{py_sitescriptdir}/%{module}/locale | |
87 | %{py_sitescriptdir}/%{module}/templates | |
88 | %dir %{py_sitescriptdir}/%{module}/static | |
89 | %dir %{py_sitescriptdir}/%{module}/static/css | |
90 | %{py_sitescriptdir}/%{module}/static/css/beautify.css | |
91 | %{py_sitescriptdir}/%{module}/static/css/fieldbg.gif | |
92 | %{py_sitescriptdir}/%{module}/static/css/form.css | |
93 | %{py_sitescriptdir}/%{module}/static/css/jquery-ui-timepicker-addon.css | |
94 | %{py_sitescriptdir}/%{module}/static/css/jquery.autocomplete.css | |
95 | %{py_sitescriptdir}/%{module}/static/css/next.gif | |
96 | %{py_sitescriptdir}/%{module}/static/css/prev.gif | |
97 | %{py_sitescriptdir}/%{module}/static/css/ui-lightness | |
98 | %dir %{py_sitescriptdir}/%{module}/static/scripts | |
99 | %{py_sitescriptdir}/%{module}/static/scripts/deform.js | |
100 | %{py_sitescriptdir}/%{module}/static/scripts/jquery-1.4.2.min.js | |
101 | %{py_sitescriptdir}/%{module}/static/scripts/jquery-1.7.2.min.js | |
102 | %{py_sitescriptdir}/%{module}/static/scripts/jquery-ui-1.8.11.custom.min.js | |
103 | %{py_sitescriptdir}/%{module}/static/scripts/jquery-ui-timepicker-addon.js | |
104 | %{py_sitescriptdir}/%{module}/static/scripts/jquery.form-3.09.js | |
105 | %{py_sitescriptdir}/%{module}/static/scripts/jquery.form.js | |
106 | %{py_sitescriptdir}/%{module}/static/scripts/jquery.maskMoney-1.4.1.js | |
107 | %{py_sitescriptdir}/%{module}/static/scripts/jquery.maskedinput-1.2.2.min.js | |
108 | %{py_sitescriptdir}/%{module}/static/tinymce |