]>
Commit | Line | Data |
---|---|---|
563f246f JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
4463821f | 5 | %bcond_without tests # unit tests |
563f246f JB |
6 | |
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 | |
4463821f JB |
10 | Version: 13.0.0.post2 |
11 | Release: 1 | |
563f246f JB |
12 | License: Apache v2.0 |
13 | Group: Libraries/Python | |
9b55e7da | 14 | #Source0Download: https://pypi.org/simple/unicodedata2/ |
563f246f | 15 | Source0: https://files.pythonhosted.org/packages/source/u/unicodedata2/unicodedata2-%{version}.tar.gz |
4463821f | 16 | # Source0-md5: 86e686b640c1893a81d57e1a0a2affb1 |
3dd049f1 | 17 | URL: https://pypi.org/project/unicodedata2/ |
563f246f JB |
18 | BuildRequires: rpm-pythonprov |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
4463821f | 21 | BuildRequires: python-devel >= 1:2.7 |
563f246f JB |
22 | BuildRequires: python-setuptools |
23 | %endif | |
24 | %if %{with python3} | |
4463821f | 25 | BuildRequires: python3-devel >= 1:3.5 |
563f246f JB |
26 | BuildRequires: python3-setuptools |
27 | %endif | |
4463821f | 28 | Requires: python-libs >= 1:2.7 |
563f246f JB |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
32 | Unicodedata backport/updates to Python 2.x. | |
33 | ||
34 | Additionally this module backports named aliases and named sequences | |
35 | support to Python 2. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Uaktualnienia danych Unicode dla Pythona 2.x. | |
39 | ||
40 | Dodatkowo ten moduł zawiera backport nazwanych aliasów i nazwanych | |
41 | sekwencji do Pythona 2. | |
42 | ||
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 | |
4463821f | 47 | Requires: python3-libs >= 1:3.5 |
563f246f JB |
48 | |
49 | %description -n python3-unicodedata2 | |
50 | Unicodedata backport/updates to Python 3.x. | |
51 | ||
52 | %description -n python3-unicodedata2 -l pl.UTF-8 | |
53 | Uaktualnienia danych Unicode dla Pythona 3.x. | |
54 | ||
55 | %prep | |
56 | %setup -q -n unicodedata2-%{version} | |
57 | ||
58 | %build | |
59 | %if %{with python2} | |
60 | %py_build | |
4463821f JB |
61 | |
62 | %if %{with tests} | |
63 | PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \ | |
64 | %{__python} tests/test_unicodedata2.py | |
65 | %endif | |
563f246f JB |
66 | %endif |
67 | ||
68 | %if %{with python3} | |
69 | %py3_build | |
4463821f JB |
70 | |
71 | %if %{with tests} | |
72 | PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \ | |
73 | %{__python3} tests/test_unicodedata2.py | |
74 | %endif | |
563f246f JB |
75 | %endif |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %if %{with python2} | |
81 | %py_install | |
82 | ||
83 | %py_postclean | |
84 | %endif | |
85 | ||
86 | %if %{with python3} | |
87 | %py3_install | |
88 | %endif | |
89 | ||
90 | %clean | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %if %{with python2} | |
94 | %files | |
95 | %defattr(644,root,root,755) | |
4463821f | 96 | %doc CHANGELOG.md README.md |
563f246f JB |
97 | %attr(755,root,root) %{py_sitedir}/unicodedata2.so |
98 | %{py_sitedir}/unicodedata2-%{version}-py*.egg-info | |
99 | %endif | |
100 | ||
101 | %if %{with python3} | |
102 | %files -n python3-unicodedata2 | |
103 | %defattr(644,root,root,755) | |
4463821f | 104 | %doc CHANGELOG.md README.md |
563f246f JB |
105 | %attr(755,root,root) %{py3_sitedir}/unicodedata2.cpython-*.so |
106 | %{py3_sitedir}/unicodedata2-%{version}-py*.egg-info | |
107 | %endif |