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