3 %bcond_without python2 # CPython 2.x module
4 %bcond_with python3 # CPython 3.x module (built from python3-unicodedata2.spec)
5 %bcond_without tests # unit tests
7 Summary: Unicodedata backport/updates to Python 2.x
8 Summary(pl.UTF-8): Uaktualnienia danych Unicode dla Pythona 2.x
9 Name: python-unicodedata2
10 # keep 13.x for python2 support
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/unicodedata2/
16 Source0: https://files.pythonhosted.org/packages/source/u/unicodedata2/unicodedata2-%{version}.tar.gz
17 # Source0-md5: 86e686b640c1893a81d57e1a0a2affb1
18 URL: https://pypi.org/project/unicodedata2/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-devel >= 1:2.7
23 BuildRequires: python-setuptools
26 BuildRequires: python3-devel >= 1:3.5
27 BuildRequires: python3-setuptools
29 Requires: python-libs >= 1:2.7
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Unicodedata backport/updates to Python 2.x.
35 Additionally this module backports named aliases and named sequences
38 %description -l pl.UTF-8
39 Uaktualnienia danych Unicode dla Pythona 2.x.
41 Dodatkowo ten moduł zawiera backport nazwanych aliasów i nazwanych
42 sekwencji do Pythona 2.
44 %package -n python3-unicodedata2
45 Summary: Unicodedata backport/updates to Python 3.x
46 Summary(pl.UTF-8): Uaktualnienia danych Unicode dla Pythona 3.x
47 Group: Libraries/Python
48 Requires: python3-libs >= 1:3.5
50 %description -n python3-unicodedata2
51 Unicodedata backport/updates to Python 3.x.
53 %description -n python3-unicodedata2 -l pl.UTF-8
54 Uaktualnienia danych Unicode dla Pythona 3.x.
57 %setup -q -n unicodedata2-%{version}
64 PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
65 %{__python} tests/test_unicodedata2.py
73 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
74 %{__python3} tests/test_unicodedata2.py
79 rm -rf $RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc CHANGELOG.md README.md
98 %attr(755,root,root) %{py_sitedir}/unicodedata2.so
99 %{py_sitedir}/unicodedata2-%{version}-py*.egg-info
103 %files -n python3-unicodedata2
104 %defattr(644,root,root,755)
105 %doc CHANGELOG.md README.md
106 %attr(755,root,root) %{py3_sitedir}/unicodedata2.cpython-*.so
107 %{py3_sitedir}/unicodedata2-%{version}-py*.egg-info