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