]> git.pld-linux.org Git - packages/python-unicodedata2.git/blob - python-unicodedata2.spec
- disable python2 here
[packages/python-unicodedata2.git] / python-unicodedata2.spec
1 #
2 # Conditional build:
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
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
10 # keep 13.x for python2 support
11 Version:        13.0.0.post2
12 Release:        1
13 License:        Apache v2.0
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
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.7
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel >= 1:3.5
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-libs >= 1:2.7
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Unicodedata backport/updates to Python 2.x.
34
35 Additionally this module backports named aliases and named sequences
36 support to Python 2.
37
38 %description -l pl.UTF-8
39 Uaktualnienia danych Unicode dla Pythona 2.x.
40
41 Dodatkowo ten moduł zawiera backport nazwanych aliasów i nazwanych
42 sekwencji do Pythona 2.
43
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
49
50 %description -n python3-unicodedata2
51 Unicodedata backport/updates to Python 3.x.
52
53 %description -n python3-unicodedata2 -l pl.UTF-8
54 Uaktualnienia danych Unicode dla Pythona 3.x.
55
56 %prep
57 %setup -q -n unicodedata2-%{version}
58
59 %build
60 %if %{with python2}
61 %py_build
62
63 %if %{with tests}
64 PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
65 %{__python} tests/test_unicodedata2.py
66 %endif
67 %endif
68
69 %if %{with python3}
70 %py3_build
71
72 %if %{with tests}
73 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
74 %{__python3} tests/test_unicodedata2.py
75 %endif
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %if %{with python2}
82 %py_install
83
84 %py_postclean
85 %endif
86
87 %if %{with python3}
88 %py3_install
89 %endif
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %files
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
100 %endif
101
102 %if %{with python3}
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
108 %endif
This page took 0.114609 seconds and 3 git commands to generate.