]> git.pld-linux.org Git - packages/python-babel.git/blob - python-babel.spec
dependencies fixes
[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:        3
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.pocoo.org/
22 %if %{with python2}
23 BuildRequires:  python-devel
24 BuildRequires:  python-devel-tools
25 BuildRequires:  python-setuptools
26 BuildRequires:  python-pytz
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.219
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-devel
32 BuildRequires:  python3-devel-tools
33 BuildRequires:  python3-setuptools
34 BuildRequires:  python3-modules
35 BuildRequires:  python3-pytz
36 %endif
37 Requires:       python-modules
38 Requires:       python-pytz
39 Obsoletes:      python-Babel
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Babel is a Python library that provides an integrated collection of
45 utilities that assist with internationalizing and localizing Python
46 applications (in particular web-based applications).
47
48 # %description -l pl.UTF-8
49
50 %package -n python3-%{module}
51 Summary:        Babel Python library
52 Summary(pl.UTF-8):      Biblioteka Babel do Pythona
53 Group:          Libraries/Python
54 Requires:       python3-modules
55 Requires:       python3-pytz
56
57 %description -n python3-%{module}
58 Babel is a Python library that provides an integrated collection of
59 utilities that assist with internationalizing and localizing Python
60 applications (in particular web-based applications).
61
62 # %description -n python3-%{module} -l pl.UTF-8
63
64 %package apidocs
65 Summary:        Python Babel API documentation
66 Group:          Documentation
67
68 %description apidocs
69 Python Babel API documentation.
70
71 %prep
72 %setup -q -n Babel-%{version}
73
74 %build
75 %if %{with python2}
76 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
77 %endif
78
79 %if %{with python3}
80 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
81 %endif
82
83 %if %{with doc}
84 cd docs
85 %{__make} -j1 html
86 rm -rf _build/html/_sources
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %{__python} setup.py \
94         build --build-base build-2 \
95         install --skip-build \
96         --optimize=2 \
97         --root=$RPM_BUILD_ROOT
98
99 %py_postclean
100 %endif
101
102 %if %{with python3}
103 %{__python3} setup.py \
104         build --build-base build-3 \
105         install --skip-build \
106         --optimize=2 \
107         --root=$RPM_BUILD_ROOT
108 %endif
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc AUTHORS CHANGES LICENSE README
117 %attr(755,root,root) %{_bindir}/pybabel
118 %dir %{py_sitescriptdir}/babel
119 %{py_sitescriptdir}/babel/*.dat
120 %{py_sitescriptdir}/babel/*.py[co]
121 %dir %{py_sitescriptdir}/babel/localtime
122 %{py_sitescriptdir}/babel/localtime/*.py[co]
123
124 %dir %{py_sitescriptdir}/babel/localedata
125 # TODO: %lang tag
126 %{py_sitescriptdir}/babel/localedata/*.dat
127 %dir %{py_sitescriptdir}/babel/messages
128 %{py_sitescriptdir}/babel/messages/*.py[co]
129
130 %if "%{py_ver}" > "2.4"
131 %{py_sitescriptdir}/Babel-%{version}-py*.egg-info
132 %endif
133 %endif
134
135 %if %{with python3}
136 %files -n python3-%{module}
137 %defattr(644,root,root,755)
138 %doc AUTHORS CHANGES LICENSE README
139 %{py3_sitescriptdir}/%{module}
140 %{py3_sitescriptdir}/Babel-%{version}-py*.egg-info
141 %endif
142
143 %if %{with doc}
144 %files apidocs
145 %defattr(644,root,root,755)
146 %doc docs/_build/html/*
147 %endif
148
This page took 0.038847 seconds and 4 git commands to generate.