]> git.pld-linux.org Git - packages/python-pyicu.git/blame_incremental - python-pyicu.spec
- force C++11 (in case it's not compiler default, e.g. gcc 4 or 5)
[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: 1.9.6
11Release: 1
12License: MIT-like
13Group: Development/Languages/Python
14Source0: https://pypi.python.org/packages/bc/78/f4e26f67c9b6b9074baa576ae67947e42fb86039199a65e9ab91ddb51d26/PyICU-%{version}.tar.gz
15# Source0-md5: bb7838411ba9c7363503745220c754e9
16URL: https://pypi.python.org/pypi/PyICU
17BuildRequires: libicu-devel >= 59
18BuildRequires: libstdc++-devel >= 6:4.7
19%if %{with python2}
20BuildRequires: python-devel >= 1:2.3
21BuildRequires: python-modules >= 1:2.3
22%endif
23%if %{with python3}
24BuildRequires: python3-2to3 >= 1:3.2
25BuildRequires: python3-devel >= 1:3.2
26BuildRequires: python3-modules >= 1:3.2
27%endif
28BuildRequires: rpm-pythonprov
29BuildRequires: rpmbuild(macros) >= 1.714
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33PyICU is a Python extension wrapping IBM's ICU C++ API.
34
35This package contains Python 2 module.
36
37%description -l pl.UTF-8
38PyICU to rozszerzenie Pythona obudowujące API C++ biblioteki ICU firmy
39IBM.
40
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
59%prep
60%setup -q -n PyICU-%{version}
61
62%build
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
66%if %{with python2}
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}
71%endif
72
73%if %{with python3}
74%py3_build
75
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}
78%endif
79
80%install
81rm -rf $RPM_BUILD_ROOT
82
83%if %{with python2}
84%py_install
85%py_postclean
86%endif
87
88%if %{with python3}
89%py3_install
90%endif
91
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95%if %{with python2}
96%files
97%defattr(644,root,root,755)
98%doc CHANGES CREDITS LICENSE README.md
99%{py_sitedir}/PyICU.py[co]
100%dir %{py_sitedir}/icu
101%{py_sitedir}/icu/__init__.py[co]
102%{py_sitedir}/icu/docs.py[co]
103%attr(755,root,root) %{py_sitedir}/_icu.so
104%if "%{py_ver}" > "2.4"
105%{py_sitedir}/PyICU-%{version}-py*.egg-info
106%endif
107%endif
108
109%if %{with python3}
110%files -n python3-pyicu
111%defattr(644,root,root,755)
112%doc CHANGES CREDITS LICENSE README.md
113%{py3_sitedir}/PyICU.py
114%dir %{py3_sitedir}/icu
115%{py3_sitedir}/__pycache__/PyICU.*.py[co]
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]
121%attr(755,root,root) %{py3_sitedir}/_icu.cpython-*.so
122%{py3_sitedir}/PyICU-%{version}-py*.egg-info
123%endif
This page took 0.023034 seconds and 4 git commands to generate.