]> 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%bcond_without tests # unit tests
6#
7Summary: PyICU - Python 2 extension wrapping IBM's ICU C++ API
8Summary(pl.UTF-8): PyICU - rozszerzenie Pythona 2 obudowujące API C++ biblioteki ICU firmy IBM
9Name: python-pyicu
10Version: 2.10.2
11Release: 2
12License: MIT-like
13Group: Development/Languages/Python
14#Source0Download: https://pypi.org/simple/PyICU/
15Source0: https://files.pythonhosted.org/packages/source/P/PyICU/PyICU-%{version}.tar.gz
16# Source0-md5: 4090ebb98702338cac3dbed2d72c2fd7
17Patch0: 0001-disable-failing-test.patch
18URL: https://pypi.org/project/PyICU/
19BuildRequires: libicu-devel >= 59
20BuildRequires: libstdc++-devel >= 6:4.7
21%if %{with python2}
22BuildRequires: python-devel >= 1:2.3
23BuildRequires: python-modules >= 1:2.3
24%if %{with tests}
25BuildRequires: python-six
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-2to3 >= 1:3.2
30BuildRequires: python3-devel >= 1:3.2
31BuildRequires: python3-modules >= 1:3.2
32%if %{with tests}
33BuildRequires: python3-six
34%endif
35%endif
36BuildRequires: rpm-pythonprov
37BuildRequires: rpmbuild(macros) >= 1.714
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41PyICU is a Python extension wrapping IBM's ICU C++ API.
42
43This package contains Python 2 module.
44
45%description -l pl.UTF-8
46PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
47IBM.
48
49Ten pakiet zawiera moduł Pythona 2.
50
51%package -n python3-pyicu
52Summary: PyICU - Python 3 extension wrapping IBM's ICU C++ API
53Summary(pl.UTF-8): PyICU - rozszerzenie Pythona 3 obudowujące API C++ biblioteki ICU firmy IBM
54Group: Development/Languages/Python
55
56%description -n python3-pyicu
57PyICU is a Python extension wrapping IBM's ICU C++ API.
58
59This package contains Python 3 module.
60
61%description -n python3-pyicu -l pl.UTF-8
62PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
63IBM.
64
65Ten pakiet zawiera moduł Pythona 3.
66
67%prep
68%setup -q -n PyICU-%{version}
69%patch0 -p1
70
71%build
72# uses ICU C++ API, which (in case if icu 59+) needs char16_t as distinct type, i.e. C++ 11
73CFLAGS="%{rpmcxxflags} %{rpmcppflags} -std=c++11"
74
75%if %{with python2}
76%py_build
77
78# tests need module already built
79%{?with_tests:PYTHONPATH=$(pwd)/$(echo build-2/lib.*) %{__python} -m unittest discover -s test}
80%endif
81
82%if %{with python3}
83%py3_build
84
85# tests to be 2to3'ed (by setup) and module already built
86%{?with_tests:PYTHONPATH=$(pwd)/$(echo build-3/lib.*) %{__python3} -m unittest discover -s test}
87%endif
88
89%install
90rm -rf $RPM_BUILD_ROOT
91
92%if %{with python2}
93%py_install
94%py_postclean
95%endif
96
97%if %{with python3}
98%py3_install
99%endif
100
101%clean
102rm -rf $RPM_BUILD_ROOT
103
104%if %{with python2}
105%files
106%defattr(644,root,root,755)
107%doc CHANGES CREDITS LICENSE README.md
108%dir %{py_sitedir}/icu
109%{py_sitedir}/icu/__init__.py[co]
110%attr(755,root,root) %{py_sitedir}/icu/_icu_.so
111%if "%{py_ver}" > "2.4"
112%{py_sitedir}/PyICU-%{version}-py*.egg-info
113%endif
114%endif
115
116%if %{with python3}
117%files -n python3-pyicu
118%defattr(644,root,root,755)
119%doc CHANGES CREDITS LICENSE README.md
120%dir %{py3_sitedir}/icu
121%{py3_sitedir}/icu/__init__.py
122%{py3_sitedir}/icu/__pycache__
123%attr(755,root,root) %{py3_sitedir}/icu/_icu_.cpython-*.so
124%{py3_sitedir}/PyICU-%{version}-py*.egg-info
125%endif
This page took 0.035303 seconds and 5 git commands to generate.