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