]>
Commit | Line | Data |
---|---|---|
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 | |
8 | Name: python-pyicu | |
9 | Version: 1.8 | |
10 | Release: 7 | |
11 | License: MIT-like | |
12 | Group: Development/Languages/Python | |
13 | Source0: https://pypi.python.org/packages/source/P/PyICU/PyICU-%{version}.tar.gz | |
14 | # Source0-md5: 00c8d40e5400f52c8474aa9480e8dbc1 | |
15 | URL: http://pyicu.osafoundation.org/ | |
16 | BuildRequires: libicu-devel >= 3.6 | |
17 | BuildRequires: libstdc++-devel | |
18 | %if %{with python2} | |
19 | BuildRequires: python-devel >= 1:2.3 | |
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 | |
26 | BuildRequires: rpm-pythonprov | |
27 | BuildRequires: rpmbuild(macros) >= 1.612 | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | PyICU is a Python extension wrapping IBM's ICU C++ API. | |
32 | ||
33 | This package contains Python 2 module. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy | |
37 | IBM. | |
38 | ||
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 | ||
57 | %prep | |
58 | %setup -q -n PyICU-%{version} | |
59 | ||
60 | %build | |
61 | %if %{with python2} | |
62 | %py_build \ | |
63 | --build-base build-2 | |
64 | %endif | |
65 | ||
66 | %if %{with python3} | |
67 | %py3_build \ | |
68 | --build-base build-3 | |
69 | %endif | |
70 | ||
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %if %{with python2} | |
75 | %py_build \ | |
76 | --build-base build-2 \ | |
77 | install \ | |
78 | --skip-build \ | |
79 | --optimize=2 \ | |
80 | --root=$RPM_BUILD_ROOT | |
81 | ||
82 | %py_postclean | |
83 | %endif | |
84 | ||
85 | %if %{with python3} | |
86 | %py3_build \ | |
87 | --build-base build-3 \ | |
88 | install \ | |
89 | --skip-build \ | |
90 | --optimize=2 \ | |
91 | --root=$RPM_BUILD_ROOT | |
92 | %endif | |
93 | ||
94 | %clean | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %if %{with python2} | |
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %doc CHANGES CREDITS LICENSE README | |
101 | %{py_sitedir}/PyICU.py[co] | |
102 | %{py_sitedir}/docs.py[co] | |
103 | %{py_sitedir}/icu.py[co] | |
104 | %attr(755,root,root) %{py_sitedir}/_icu.so | |
105 | %if "%{py_ver}" > "2.4" | |
106 | %{py_sitedir}/PyICU-%{version}-py*.egg-info | |
107 | %endif | |
108 | %endif | |
109 | ||
110 | %if %{with python3} | |
111 | %files -n python3-pyicu | |
112 | %defattr(644,root,root,755) | |
113 | %doc CHANGES CREDITS LICENSE README | |
114 | %{py3_sitedir}/PyICU.py | |
115 | %{py3_sitedir}/docs.py | |
116 | %{py3_sitedir}/icu.py | |
117 | %{py3_sitedir}/__pycache__/PyICU.*.py[co] | |
118 | %{py3_sitedir}/__pycache__/docs.*.py[co] | |
119 | %{py3_sitedir}/__pycache__/icu.*.py[co] | |
120 | %attr(755,root,root) %{py3_sitedir}/_icu.cpython-*.so | |
121 | %{py3_sitedir}/PyICU-%{version}-py*.egg-info | |
122 | %endif |