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