]> git.pld-linux.org Git - packages/python-babel.git/blob - python-babel.spec
- python 3.4
[packages/python-babel.git] / python-babel.spec
1 # TODO
2 # - lang tag /usr/share/python*/site-packages/babel/localedata/*
3 #
4 # Conditional build:
5 %bcond_without  doc             # don't build doc
6 %bcond_without  tests   # do not perform "make test"
7 %bcond_without  python2 # CPython 2.x module
8 %bcond_without  python3 # CPython 3.x module
9
10
11 %define         module  babel
12 Summary:        Babel Python library
13 Summary(pl.UTF-8):      Biblioteka Babel do Pythona
14 Name:           python-%{module}
15 Version:        1.3
16 Release:        2
17 License:        BSD-like
18 Group:          Development/Languages/Python
19 Source0:        http://pypi.python.org/packages/source/B/Babel/Babel-%{version}.tar.gz
20 # Source0-md5:  5264ceb02717843cbc9ffce8e6e06bdb
21 URL:            http://babel.edgewall.org/
22 %if %{with python2}
23 BuildRequires:  python-devel
24 BuildRequires:  python-devel-tools
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.219
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel
30 BuildRequires:  python3-distribute
31 BuildRequires:  python3-modules
32 %endif
33
34 Requires:       python-modules
35 Obsoletes:      python-Babel
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Babel is a Python library that provides an integrated collection of
41 utilities that assist with internationalizing and localizing Python
42 applications (in particular web-based applications).
43
44 # %description -l pl.UTF-8
45
46 %package -n python3-%{module}
47 Summary:        -
48 Summary(pl.UTF-8):      -
49 Group:          Libraries/Python
50 Requires:       python3-modules
51
52 %description -n python3-%{module}
53 Babel is a Python library that provides an integrated collection of
54 utilities that assist with internationalizing and localizing Python
55 applications (in particular web-based applications).
56
57 # %description -n python3-%{module} -l pl.UTF-8
58
59 %package apidocs
60 Summary:        Python Babel API documentation
61 Group:          Documentation
62
63 %description apidocs
64 Python Babel API documentation.
65
66 %prep
67 %setup -q -n Babel-%{version}
68
69 %build
70 %if %{with python2}
71 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
72 %endif
73
74 %if %{with python3}
75 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
76 %endif
77
78 %if %{with doc}
79 cd docs
80 %{__make} -j1 html
81 rm -rf _build/html/_sources
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %{__python} setup.py \
89         build --build-base build-2 \
90         install --skip-build \
91         --optimize=2 \
92         --root=$RPM_BUILD_ROOT
93
94 %py_postclean
95 %endif
96
97 %if %{with python3}
98 %{__python3} setup.py \
99         build --build-base build-3 \
100         install --skip-build \
101         --optimize=2 \
102         --root=$RPM_BUILD_ROOT
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %if %{with python2}
109 %files
110 %defattr(644,root,root,755)
111 %doc AUTHORS CHANGES LICENSE README
112 %attr(755,root,root) %{_bindir}/pybabel
113 %dir %{py_sitescriptdir}/babel
114 %{py_sitescriptdir}/babel/*.dat
115 %{py_sitescriptdir}/babel/*.py[co]
116 %dir %{py_sitescriptdir}/babel/localtime
117 %{py_sitescriptdir}/babel/localtime/*.py[co]
118
119 %dir %{py_sitescriptdir}/babel/localedata
120 # TODO: %lang tag
121 %{py_sitescriptdir}/babel/localedata/*.dat
122 %dir %{py_sitescriptdir}/babel/messages
123 %{py_sitescriptdir}/babel/messages/*.py[co]
124
125 %if "%{py_ver}" > "2.4"
126 %{py_sitescriptdir}/Babel-%{version}-py*.egg-info
127 %endif
128 %endif
129
130 %if %{with python3}
131 %files -n python3-%{module}
132 %defattr(644,root,root,755)
133 %doc AUTHORS CHANGES LICENSE README
134 %{py3_sitescriptdir}/%{module}
135 %{py3_sitescriptdir}/Babel-%{version}-py*.egg-info
136 %endif
137
138 %if %{with doc}
139 %files apidocs
140 %defattr(644,root,root,755)
141 %doc docs/_build/html/*
142 %endif
143
This page took 0.113685 seconds and 3 git commands to generate.