summaryrefslogtreecommitdiff
path: root/python-FormEncode.spec
blob: 8ea49047631736d2343e3ac988ce22adacf7a262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%define module FormEncode
%define _module formencode

Summary:	HTML form validation, generation, and convertion package
Summary(pl):	Moduł do walidacji, tworzenia i konwersji formularzy HTML
Name:		python-%{module}
Version:	0.3
Release:	1
License:	PSF
Group:		Development/Languages/Python
Source0:	http://cheeseshop.python.org/packages/source/F/%{module}/%{module}-%{version}.tar.gz
# Source0-md5:	57afa5aad26bf3acb8b00e4babfe8297
Patch0:		%{name}-disable-setuptools.patch
URL:		http://formencode.org/
BuildRequires:	python
%pyrequires_eq	python-modules
Requires:	python-elementtree
BuildArch:	noarch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
FormEncode validates and converts nested structures. It allows for a
declarative form of defining the validation, and decoupled processes
for filling and generating forms.

%description -l pl
FormEncode służy do sprawdzania poprawności i konwersji zagnieżdżonych
struktur. Pozwala na deklaratywny sposób definiowania reguł poprawności
i niezależne od nich wypełnianie i generowanie formularzy.

%prep
%setup -q -n %{module}-%{version}
%patch0 -p1

%build
rm -rf ez_setup
python setup.py build

%install
rm -rf $RPM_BUILD_ROOT
python setup.py install \
	--root=$RPM_BUILD_ROOT \
	--optimize=2

find $RPM_BUILD_ROOT%{py_sitescriptdir}/%{_module}/ -name \*.py | xargs rm -f

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%{py_sitescriptdir}/%{_module}
%doc docs/*.txt