3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without tests # unit tests
7 Summary: PyICU - Python 2 extension wrapping IBM's ICU C++ API
8 Summary(pl.UTF-8): PyICU - rozszerzenie Pythona 2 obudowujące API C++ biblioteki ICU firmy IBM
13 Group: Development/Languages/Python
14 Source0: https://pypi.python.org/packages/bc/78/f4e26f67c9b6b9074baa576ae67947e42fb86039199a65e9ab91ddb51d26/PyICU-%{version}.tar.gz
15 # Source0-md5: bb7838411ba9c7363503745220c754e9
16 URL: https://pypi.python.org/pypi/PyICU
17 BuildRequires: libicu-devel >= 3.6
18 BuildRequires: libstdc++-devel
20 BuildRequires: python-devel >= 1:2.3
21 BuildRequires: python-modules >= 1:2.3
24 BuildRequires: python3-devel >= 1:3.2
25 BuildRequires: python3-modules >= 1:3.2
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.714
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 PyICU is a Python extension wrapping IBM's ICU C++ API.
34 This package contains Python 2 module.
36 %description -l pl.UTF-8
37 PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
40 Ten pakiet zawiera moduł Pythona 2.
42 %package -n python3-pyicu
43 Summary: PyICU - Python 3 extension wrapping IBM's ICU C++ API
44 Summary(pl.UTF-8): PyICU - rozszerzenie Pythona 3 obudowujące API C++ biblioteki ICU firmy IBM
45 Group: Development/Languages/Python
47 %description -n python3-pyicu
48 PyICU is a Python extension wrapping IBM's ICU C++ API.
50 This package contains Python 3 module.
52 %description -n python3-pyicu -l pl.UTF-8
53 PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
56 Ten pakiet zawiera moduł Pythona 3.
59 %setup -q -n PyICU-%{version}
63 %py_build %{?with_tests:test}
69 # tests are 2to3'ed after setup()
70 %{?with_tests:%py3_build test}
74 rm -rf $RPM_BUILD_ROOT
86 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
91 %doc CHANGES CREDITS LICENSE README.md
92 %{py_sitedir}/PyICU.py[co]
93 %dir %{py_sitedir}/icu
94 %{py_sitedir}/icu/__init__.py[co]
95 %{py_sitedir}/icu/docs.py[co]
96 %attr(755,root,root) %{py_sitedir}/_icu.so
97 %if "%{py_ver}" > "2.4"
98 %{py_sitedir}/PyICU-%{version}-py*.egg-info
103 %files -n python3-pyicu
104 %defattr(644,root,root,755)
105 %doc CHANGES CREDITS LICENSE README.md
106 %{py3_sitedir}/PyICU.py
107 %dir %{py3_sitedir}/icu
108 %{py3_sitedir}/__pycache__/PyICU.*.py[co]
109 %{py3_sitedir}/icu/__init__.py
110 %{py3_sitedir}/icu/docs.py
111 %dir %{py3_sitedir}/icu/__pycache__
112 %{py3_sitedir}/icu/__pycache__/__init__.*.py[co]
113 %{py3_sitedir}/icu/__pycache__/docs.*.py[co]
114 %attr(755,root,root) %{py3_sitedir}/_icu.cpython-*.so
115 %{py3_sitedir}/PyICU-%{version}-py*.egg-info