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