]> git.pld-linux.org Git - packages/python-pyicu.git/blobdiff - python-pyicu.spec
- release 2 (by relup.sh)
[packages/python-pyicu.git] / python-pyicu.spec
index ab8b9e2a24b954469e6a46d223bcd91ddd845396..3921e6d22e0addc9cb1b0cf8abed331c3af432c6 100644 (file)
@@ -2,26 +2,28 @@
 # Conditional build:
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
+%bcond_without tests   # unit tests
 #
 Summary:       PyICU - Python 2 extension wrapping IBM's ICU C++ API
 Summary(pl.UTF-8):     PyICU - rozszerzenie Pythona 2 obudowujące API C++ biblioteki ICU firmy IBM
 Name:          python-pyicu
-Version:       1.8
-Release:       8
+Version:       1.9.6
+Release:       2
 License:       MIT-like
 Group:         Development/Languages/Python
-Source0:       https://pypi.python.org/packages/source/P/PyICU/PyICU-%{version}.tar.gz
-# Source0-md5: 00c8d40e5400f52c8474aa9480e8dbc1
-URL:           http://pyicu.osafoundation.org/
-BuildRequires: libicu-devel >= 3.6
-BuildRequires: libstdc++-devel
+Source0:       https://pypi.python.org/packages/bc/78/f4e26f67c9b6b9074baa576ae67947e42fb86039199a65e9ab91ddb51d26/PyICU-%{version}.tar.gz
+# Source0-md5: bb7838411ba9c7363503745220c754e9
+URL:           https://pypi.python.org/pypi/PyICU
+BuildRequires: libicu-devel >= 59
+BuildRequires: libstdc++-devel >= 6:4.7
 %if %{with python2}
 BuildRequires: python-devel >= 1:2.3
 BuildRequires: python-modules >= 1:2.3
 %endif
 %if %{with python3}
-BuildRequires: python3-devel >= 3.2
-BuildRequires: python3-modules >= 3.2
+BuildRequires: python3-2to3 >= 1:3.2
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
 %endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
@@ -58,12 +60,21 @@ Ten pakiet zawiera moduł Pythona 3.
 %setup -q -n PyICU-%{version}
 
 %build
+# uses ICU C++ API, which (in case if icu 59+) needs char16_t as distinct type, i.e. C++ 11
+CFLAGS="%{rpmcxxflags} %{rpmcppflags} -std=c++11"
+
 %if %{with python2}
 %py_build
+
+# tests need module already built
+%{?with_tests:PYTHONPATH=$(pwd)/$(echo build-2/lib.*) %{__python} -m unittest discover -s test}
 %endif
 
 %if %{with python3}
 %py3_build
+
+# tests to be 2to3'ed (by setup) and module already built
+%{?with_tests:PYTHONPATH=$(pwd)/$(echo build-3/lib.*) %{__python3} -m unittest discover -s test}
 %endif
 
 %install
@@ -84,10 +95,11 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES CREDITS LICENSE README
+%doc CHANGES CREDITS LICENSE README.md
 %{py_sitedir}/PyICU.py[co]
-%{py_sitedir}/docs.py[co]
-%{py_sitedir}/icu.py[co]
+%dir %{py_sitedir}/icu
+%{py_sitedir}/icu/__init__.py[co]
+%{py_sitedir}/icu/docs.py[co]
 %attr(755,root,root) %{py_sitedir}/_icu.so
 %if "%{py_ver}" > "2.4"
 %{py_sitedir}/PyICU-%{version}-py*.egg-info
@@ -97,13 +109,15 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-pyicu
 %defattr(644,root,root,755)
-%doc CHANGES CREDITS LICENSE README
+%doc CHANGES CREDITS LICENSE README.md
 %{py3_sitedir}/PyICU.py
-%{py3_sitedir}/docs.py
-%{py3_sitedir}/icu.py
+%dir %{py3_sitedir}/icu
 %{py3_sitedir}/__pycache__/PyICU.*.py[co]
-%{py3_sitedir}/__pycache__/docs.*.py[co]
-%{py3_sitedir}/__pycache__/icu.*.py[co]
+%{py3_sitedir}/icu/__init__.py
+%{py3_sitedir}/icu/docs.py
+%dir %{py3_sitedir}/icu/__pycache__
+%{py3_sitedir}/icu/__pycache__/__init__.*.py[co]
+%{py3_sitedir}/icu/__pycache__/docs.*.py[co]
 %attr(755,root,root) %{py3_sitedir}/_icu.cpython-*.so
 %{py3_sitedir}/PyICU-%{version}-py*.egg-info
 %endif
This page took 0.206494 seconds and 4 git commands to generate.