]> git.pld-linux.org Git - packages/python-pyicu.git/blame_incremental - python-pyicu.spec
- icu rebuild
[packages/python-pyicu.git] / python-pyicu.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5#
6Summary: PyICU - Python 2 extension wrapping IBM's ICU C++ API
7Summary(pl.UTF-8): PyICU - rozszerzenie Pythona 2 obudowujące API C++ biblioteki ICU firmy IBM
8Name: python-pyicu
9Version: 1.8
10Release: 4
11License: MIT-like
12Group: Development/Languages/Python
13Source0: https://pypi.python.org/packages/source/P/PyICU/PyICU-%{version}.tar.gz
14# Source0-md5: 00c8d40e5400f52c8474aa9480e8dbc1
15URL: http://pyicu.osafoundation.org/
16BuildRequires: libicu-devel >= 3.6
17BuildRequires: libstdc++-devel
18%if %{with python2}
19BuildRequires: python-devel >= 1:2.3
20BuildRequires: python-modules >= 1:2.3
21%endif
22%if %{with python3}
23BuildRequires: python3-devel >= 3.2
24BuildRequires: python3-modules >= 3.2
25%endif
26BuildRequires: rpm-pythonprov
27BuildRequires: rpmbuild(macros) >= 1.612
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31PyICU is a Python extension wrapping IBM's ICU C++ API.
32
33This package contains Python 2 module.
34
35%description -l pl.UTF-8
36PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
37IBM.
38
39Ten pakiet zawiera moduł Pythona 2.
40
41%package -n python3-pyicu
42Summary: PyICU - Python 3 extension wrapping IBM's ICU C++ API
43Summary(pl.UTF-8): PyICU - rozszerzenie Pythona 3 obudowujące API C++ biblioteki ICU firmy IBM
44Group: Development/Languages/Python
45
46%description -n python3-pyicu
47PyICU is a Python extension wrapping IBM's ICU C++ API.
48
49This package contains Python 3 module.
50
51%description -n python3-pyicu -l pl.UTF-8
52PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
53IBM.
54
55Ten pakiet zawiera moduł Pythona 3.
56
57%prep
58%setup -q -n PyICU-%{version}
59
60%build
61%if %{with python2}
62CC="%{__cc}" \
63CFLAGS="%{rpmcflags}" \
64%{__python} setup.py build \
65 --build-base build-2
66%endif
67
68%if %{with python3}
69CC="%{__cc}" \
70CFLAGS="%{rpmcflags}" \
71%{__python3} setup.py build \
72 --build-base build-3
73%endif
74
75%install
76rm -rf $RPM_BUILD_ROOT
77
78%if %{with python2}
79%{__python} setup.py build \
80 --build-base build-2 \
81 install \
82 --skip-build \
83 --optimize=2 \
84 --root=$RPM_BUILD_ROOT
85
86%py_postclean
87%endif
88
89%if %{with python3}
90%{__python3} setup.py build \
91 --build-base build-3 \
92 install \
93 --skip-build \
94 --optimize=2 \
95 --root=$RPM_BUILD_ROOT
96%endif
97
98%clean
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
102%files
103%defattr(644,root,root,755)
104%doc CHANGES CREDITS LICENSE README
105%{py_sitedir}/PyICU.py[co]
106%{py_sitedir}/docs.py[co]
107%{py_sitedir}/icu.py[co]
108%attr(755,root,root) %{py_sitedir}/_icu.so
109%if "%{py_ver}" > "2.4"
110%{py_sitedir}/PyICU-%{version}-py*.egg-info
111%endif
112%endif
113
114%if %{with python3}
115%files -n python3-pyicu
116%defattr(644,root,root,755)
117%doc CHANGES CREDITS LICENSE README
118%{py3_sitedir}/PyICU.py
119%{py3_sitedir}/docs.py
120%{py3_sitedir}/icu.py
121%{py3_sitedir}/__pycache__/PyICU.*.py[co]
122%{py3_sitedir}/__pycache__/docs.*.py[co]
123%{py3_sitedir}/__pycache__/icu.*.py[co]
124%attr(755,root,root) %{py3_sitedir}/_icu.cpython-*.so
125%{py3_sitedir}/PyICU-%{version}-py*.egg-info
126%endif
This page took 0.117051 seconds and 4 git commands to generate.