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