]> git.pld-linux.org Git - SPECS.git/blob - python-six.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-six.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # CPython 2.x module
4 %bcond_without  python3         # CPython 3.x module
5 %bcond_without  tests           # unit tests
6 %bcond_without  doc             # Sphinx documentation
7 %bcond_without  setuptools      # build without setuptools (for bootstraping)
8
9 %define         module  six
10 Summary:        Six - Python 2 and 3 Compatibility Library (Python 2 module)
11 Summary(pl.UTF-8):      Biblioteka kompatybilności między Pythonem 2 i 3 (moduł Pythona 2)
12 Name:           python-%{module}
13 Version:        1.15.0
14 Release:        4
15 License:        MIT
16 Group:          Libraries/Python
17 #Source0Download: https://pypi.org/simple/six/
18 Source0:        https://files.pythonhosted.org/packages/source/s/six/six-%{version}.tar.gz
19 # Source0-md5:  9f90a0eaa0ea7747fda01ca79d21ebcb
20 Patch0:         %{name}-tests.patch
21 URL:            https://pypi.org/project/six/
22 %if %{with python2}
23 BuildRequires:  python >= 1:2.7
24 BuildRequires:  python-modules >= 1:2.7
25 %{?with_setuptools:BuildRequires:       python-setuptools}
26 %if %{with tests}
27 BuildRequires:  python-pytest >= 2.2.0
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3 >= 1:3.3
32 BuildRequires:  python3-modules >= 1:3.3
33 %{?with_setuptools:BuildRequires:       python3-setuptools}
34 %if %{with tests}
35 BuildRequires:  python3-pytest >= 2.2.0
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %if %{with doc}
41 BuildRequires:  sphinx-pdg >= 1.0
42 %endif
43 Requires:       python-modules >= 1:2.7
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Six provides simple utilities for wrapping over differences between
49 Python 2 and Python 3. It is intended to support codebases that work
50 on both Python 2 and 3 without modification. six consists of only one
51 Python file, so it is painless to copy into a project.
52
53 This package contains Python 2 module.
54
55 %description -l pl.UTF-8
56 Six dostarcza proste narzędzia obudowujące różnice między Pythonem 2 a
57 Pythonem 3. Celem jest wsparcie kodu działającego zarówno z Pythonem 2
58 jak i 3 bez modyfikacji. six składa się z tylko jednego pliku
59 pythonowego, więc można go bezproblemowo skopiować do projektu.
60
61 Ten pakiet zawiera moduł Pythona 2.
62
63 %package -n python3-%{module}
64 Summary:        Six - Python 2 and 3 Compatibility Library (Python 3 module)
65 Summary(pl.UTF-8):      Biblioteka kompatybilności między Pythonem 2 i 3 (moduł Pythona 3)
66 Group:          Libraries/Python
67 Requires:       python3-modules >= 1:3.3
68
69 %description -n python3-%{module}
70 Six provides simple utilities for wrapping over differences between
71 Python 2 and Python 3. It is intended to support codebases that work
72 on both Python 2 and 3 without modification. six consists of only one
73 Python file, so it is painless to copy into a project.
74
75 This package contains Python 3 module.
76
77 %description -n python3-%{module} -l pl.UTF-8
78 Six dostarcza proste narzędzia obudowujące różnice między Pythonem 2 a
79 Pythonem 3. Celem jest wsparcie kodu działającego zarówno z Pythonem 2
80 jak i 3 bez modyfikacji. six składa się z tylko jednego pliku
81 pythonowego, więc można go bezproblemowo skopiować do projektu.
82
83 Ten pakiet zawiera moduł Pythona 3.
84
85 %package apidocs
86 Summary:        Documentation for Python six module
87 Summary(pl.UTF-8):      Dokumentacja modułu Pythona six
88 Group:          Documentation
89
90 %description apidocs
91 Documentation for Python six module.
92
93 %description apidocs -l pl.UTF-8
94 Dokumentacja modułu Pythona six.
95
96 %prep
97 %setup -q -n %{module}-%{version}
98 %patch0 -p1
99
100 %build
101 %if %{with python2}
102 %py_build
103
104 %if %{with tests}
105 PYTHONPATH=$(pwd) \
106 %{__python} -m pytest test_six.py
107 %endif
108 %endif
109
110 %if %{with python3}
111 %py3_build
112
113 %if %{with tests}
114 PYTHONPATH=$(pwd) \
115 %{__python3} -m pytest test_six.py
116 %endif
117 %endif
118
119 %if %{with doc}
120 %{__make} -C documentation html
121 %endif
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125
126 %if %{with python2}
127 %py_install
128
129 %py_postclean
130 %endif
131
132 %if %{with python3}
133 %py3_install
134 %endif
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %if %{with python2}
140 %files
141 %defattr(644,root,root,755)
142 %doc CHANGES LICENSE README.rst
143 %{py_sitescriptdir}/six.py[co]
144 %{py_sitescriptdir}/six-%{version}-py*.egg-info
145 %endif
146
147 %if %{with python3}
148 %files -n python3-%{module}
149 %defattr(644,root,root,755)
150 %doc CHANGES LICENSE README.rst
151 %{py3_sitescriptdir}/six.py
152 %{py3_sitescriptdir}/__pycache__/six.*.py[co]
153 %{py3_sitescriptdir}/six-%{version}-py*.egg-info
154 %endif
155
156 %if %{with doc}
157 %files apidocs
158 %defattr(644,root,root,755)
159 %doc documentation/_build/html/{_static,*.html,*.js}
160 %endif
This page took 0.397748 seconds and 3 git commands to generate.