2 # - patch to use system .mo directly
5 %bcond_without tests # do not perform "make test"
9 %define module colander
10 Summary: A simple schema-based serialization and deserialization library
11 Name: python-%{module}
13 Release: 0.%{subver}.%{rel}
14 License: BSD-derived (http://www.repoze.org/LICENSE.txt)
15 Group: Libraries/Python
16 Source0: http://pypi.python.org/packages/source/c/colander/colander-%{version}%{subver}.tar.gz
17 # Source0-md5: 999f209bf6757b4e7045b3b56591a0eb
18 URL: http://docs.pylonsproject.org/projects/colander/
19 BuildRequires: python-distribute
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.710
23 BuildRequires: python-translationstring
25 Requires: python-modules
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 An extensible package which can be used to:
31 - deserialize and validate a data structure composed of strings,
33 - serialize an arbitrary data structure to a data structure composed
34 of strings, mappings, and lists.
37 %setup -q -n %{module}-%{version}%{subver}
42 %{?with_tests:%{__python} setup.py test}
45 rm -rf $RPM_BUILD_ROOT
48 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
49 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale/%{module}.pot
50 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale/*/LC_MESSAGES/%{module}.po
52 install -d $RPM_BUILD_ROOT%{_localedir}
53 mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/%{module}/locale/*,%{_localedir}}
54 rmdir $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale
55 # TODO: patch that the symlink won't be needed
56 ln -s %{_localedir} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/locale
58 mv $RPM_BUILD_ROOT%{_localedir}/{de_DE,de}
59 mv $RPM_BUILD_ROOT%{_localedir}/{zh,zh_CN}
63 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
64 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
68 rm -rf $RPM_BUILD_ROOT
70 %files -f %{module}.lang
71 %defattr(644,root,root,755)
72 %doc CHANGES.txt LICENSE.txt README.txt
73 %dir %{py_sitescriptdir}/%{module}
74 %{py_sitescriptdir}/%{module}/*.py[co]
75 %{py_sitescriptdir}/%{module}-%{version}*.egg-info
76 %{py_sitescriptdir}/%{module}/locale