]> git.pld-linux.org Git - SPECS.git/blob - python-colander.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-colander.spec
1 # TODO
2 # - patch to use system .mo directly
3
4 # Conditional build:
5 %bcond_without  tests   # do not perform "make test"
6
7 %define         subver  a1
8 %define         rel             3
9 %define         module  colander
10 Summary:        A simple schema-based serialization and deserialization library
11 Name:           python-%{module}
12 Version:        1.0
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
22 %if %{with tests}
23 BuildRequires:  python-translationstring
24 %endif
25 Requires:       python-modules
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 An extensible package which can be used to:
31 - deserialize and validate a data structure composed of strings,
32   mappings, and lists.
33 - serialize an arbitrary data structure to a data structure composed
34   of strings, mappings, and lists.
35
36 %prep
37 %setup -q -n %{module}-%{version}%{subver}
38
39 %build
40 %py_build
41
42 %{?with_tests:%{__python} setup.py test}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 %py_install
47
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
51
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
57
58 mv $RPM_BUILD_ROOT%{_localedir}/{de_DE,de}
59 mv $RPM_BUILD_ROOT%{_localedir}/{zh,zh_CN}
60
61 %find_lang %{module}
62
63 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
64 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
65 %py_postclean
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
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
This page took 2.156369 seconds and 3 git commands to generate.