]> git.pld-linux.org Git - packages/python-six.git/blame - python-six.spec
- release 4 (by relup.sh)
[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}
94529348 13Version: 1.15.0
504de7d9 14Release: 4
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
94529348 19# Source0-md5: 9f90a0eaa0ea7747fda01ca79d21ebcb
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}
105PYTHONPATH=$(pwd) \
106%{__python} -m pytest test_six.py
107%endif
0e35a0fa 108%endif
7a7ec46e 109
0e35a0fa 110%if %{with python3}
1c4b2e5b 111%py3_build
7a7ec46e
JB
112
113%if %{with tests}
114PYTHONPATH=$(pwd) \
115%{__python3} -m pytest test_six.py
116%endif
117%endif
118
119%if %{with doc}
120%{__make} -C documentation html
0e35a0fa
JK
121%endif
122
123%install
124rm -rf $RPM_BUILD_ROOT
2a218e90 125
0e35a0fa 126%if %{with python2}
1c4b2e5b 127%py_install
0e35a0fa 128
0e35a0fa
JK
129%py_postclean
130%endif
131
132%if %{with python3}
1c4b2e5b 133%py3_install
0e35a0fa
JK
134%endif
135
136%clean
137rm -rf $RPM_BUILD_ROOT
138
139%if %{with python2}
140%files
141%defattr(644,root,root,755)
7a7ec46e 142%doc CHANGES LICENSE README.rst
2a218e90 143%{py_sitescriptdir}/six.py[co]
2a218e90 144%{py_sitescriptdir}/six-%{version}-py*.egg-info
0e35a0fa 145%endif
0e35a0fa
JK
146
147%if %{with python3}
148%files -n python3-%{module}
149%defattr(644,root,root,755)
7a7ec46e 150%doc CHANGES LICENSE README.rst
2a218e90
JB
151%{py3_sitescriptdir}/six.py
152%{py3_sitescriptdir}/__pycache__/six.*.py[co]
153%{py3_sitescriptdir}/six-%{version}-py*.egg-info
0e35a0fa 154%endif
7a7ec46e
JB
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.114525 seconds and 4 git commands to generate.