3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
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
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/unicodedata2/
15 Source0: https://files.pythonhosted.org/packages/source/u/unicodedata2/unicodedata2-%{version}.tar.gz
16 # Source0-md5: 86e686b640c1893a81d57e1a0a2affb1
17 URL: https://pypi.org/project/unicodedata2/
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-devel >= 1:2.7
22 BuildRequires: python-setuptools
25 BuildRequires: python3-devel >= 1:3.5
26 BuildRequires: python3-setuptools
28 Requires: python-libs >= 1:2.7
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Unicodedata backport/updates to Python 2.x.
34 Additionally this module backports named aliases and named sequences
37 %description -l pl.UTF-8
38 Uaktualnienia danych Unicode dla Pythona 2.x.
40 Dodatkowo ten moduł zawiera backport nazwanych aliasów i nazwanych
41 sekwencji do Pythona 2.
43 %package -n python3-unicodedata2
44 Summary: Unicodedata backport/updates to Python 3.x
45 Summary(pl.UTF-8): Uaktualnienia danych Unicode dla Pythona 3.x
46 Group: Libraries/Python
47 Requires: python3-libs >= 1:3.5
49 %description -n python3-unicodedata2
50 Unicodedata backport/updates to Python 3.x.
52 %description -n python3-unicodedata2 -l pl.UTF-8
53 Uaktualnienia danych Unicode dla Pythona 3.x.
56 %setup -q -n unicodedata2-%{version}
63 PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
64 %{__python} tests/test_unicodedata2.py
72 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
73 %{__python3} tests/test_unicodedata2.py
78 rm -rf $RPM_BUILD_ROOT
91 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc CHANGELOG.md README.md
97 %attr(755,root,root) %{py_sitedir}/unicodedata2.so
98 %{py_sitedir}/unicodedata2-%{version}-py*.egg-info
102 %files -n python3-unicodedata2
103 %defattr(644,root,root,755)
104 %doc CHANGELOG.md README.md
105 %attr(755,root,root) %{py3_sitedir}/unicodedata2.cpython-*.so
106 %{py3_sitedir}/unicodedata2-%{version}-py*.egg-info