]> git.pld-linux.org Git - packages/python-pyicu.git/blame - python-pyicu.spec
- updated to 2.3
[packages/python-pyicu.git] / python-pyicu.spec
CommitLineData
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#
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
01cab8ba 9Name: python-pyicu
4b18033f
AG
10Version: 2.3
11Release: 1
01cab8ba 12License: MIT-like
bf26a09a 13Group: Development/Languages/Python
4b18033f
AG
14Source0: https://files.pythonhosted.org/packages/87/10/fdf5842f42834f6e3141668b607c07bc3c94de39acf582c3d4015e7a7fc5/PyICU-2.3.tar.gz
15# Source0-md5: 622d9bc07bca7d5be4b5cc061f4770c4
16Patch0: 0001-disable-failing-test.patch
8f268e25 17URL: https://pypi.python.org/pypi/PyICU
a93faa77
JB
18BuildRequires: libicu-devel >= 59
19BuildRequires: libstdc++-devel >= 6:4.7
cc11606c 20%if %{with python2}
a64306b6 21BuildRequires: python-devel >= 1:2.3
cc11606c
JB
22BuildRequires: python-modules >= 1:2.3
23%endif
24%if %{with python3}
a93faa77 25BuildRequires: python3-2to3 >= 1:3.2
6e490d5e
JB
26BuildRequires: python3-devel >= 1:3.2
27BuildRequires: python3-modules >= 1:3.2
cc11606c 28%endif
2a710a52 29BuildRequires: rpm-pythonprov
bc6615bb 30BuildRequires: rpmbuild(macros) >= 1.714
a64306b6
ER
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
01cab8ba
JB
34PyICU is a Python extension wrapping IBM's ICU C++ API.
35
cc11606c
JB
36This package contains Python 2 module.
37
01cab8ba
JB
38%description -l pl.UTF-8
39PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
40IBM.
a64306b6 41
cc11606c
JB
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
a64306b6
ER
60%prep
61%setup -q -n PyICU-%{version}
4b18033f 62%patch0 -p1
a64306b6
ER
63
64%build
a93faa77
JB
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
cc11606c 68%if %{with python2}
a93faa77
JB
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}
cc11606c
JB
73%endif
74
75%if %{with python3}
bc6615bb 76%py3_build
6e490d5e 77
a93faa77
JB
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}
cc11606c 80%endif
a64306b6
ER
81
82%install
83rm -rf $RPM_BUILD_ROOT
cc11606c
JB
84
85%if %{with python2}
bc6615bb 86%py_install
a64306b6 87%py_postclean
cc11606c
JB
88%endif
89
90%if %{with python3}
bc6615bb 91%py3_install
cc11606c 92%endif
a64306b6
ER
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
cc11606c 97%if %{with python2}
a64306b6
ER
98%files
99%defattr(644,root,root,755)
77896448 100%doc CHANGES CREDITS LICENSE README.md
a64306b6 101%{py_sitedir}/PyICU.py[co]
8f268e25
JR
102%dir %{py_sitedir}/icu
103%{py_sitedir}/icu/__init__.py[co]
bf26a09a 104%attr(755,root,root) %{py_sitedir}/_icu.so
a64306b6 105%if "%{py_ver}" > "2.4"
01cab8ba 106%{py_sitedir}/PyICU-%{version}-py*.egg-info
a64306b6 107%endif
cc11606c
JB
108%endif
109
110%if %{with python3}
111%files -n python3-pyicu
112%defattr(644,root,root,755)
77896448 113%doc CHANGES CREDITS LICENSE README.md
cc11606c 114%{py3_sitedir}/PyICU.py
8f268e25 115%dir %{py3_sitedir}/icu
cc11606c 116%{py3_sitedir}/__pycache__/PyICU.*.py[co]
8f268e25 117%{py3_sitedir}/icu/__init__.py
8f268e25
JR
118%dir %{py3_sitedir}/icu/__pycache__
119%{py3_sitedir}/icu/__pycache__/__init__.*.py[co]
cc11606c
JB
120%attr(755,root,root) %{py3_sitedir}/_icu.cpython-*.so
121%{py3_sitedir}/PyICU-%{version}-py*.egg-info
122%endif
This page took 0.075377 seconds and 4 git commands to generate.