]> git.pld-linux.org Git - packages/python-wheel.git/blame - python-wheel.spec
rebuild with python 3.10
[packages/python-wheel.git] / python-wheel.spec
CommitLineData
9739dc1f
ER
1#
2# Conditional build:
1758bfc3
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
9739dc1f 5%bcond_without python2 # CPython 2.x module
2e60e376 6%bcond_without python3 # CPython 3.x module
9739dc1f
ER
7
8%define module wheel
9Summary: A built-package format for Python
2e60e376 10Summary(pl.UTF-8): Format zbudowanych pakietów dla Pythona
9739dc1f 11Name: python-%{module}
1758bfc3 12Version: 0.37.1
5f9a00a0 13Release: 2
9739dc1f
ER
14License: MIT
15Group: Libraries/Python
2e60e376
JB
16#Source0Download: https://pypi.python.org/simple/wheel/
17Source0: https://pypi.python.org/packages/source/w/wheel/%{module}-%{version}.tar.gz
1758bfc3 18# Source0-md5: f490f1399e5903706cb1d4fbed9ecb28
9739dc1f
ER
19URL: https://bitbucket.org/pypa/wheel
20%if %{with python2}
1758bfc3
JB
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-setuptools >= 1:40.9.0
2e60e376 23%if %{with tests}
9739dc1f 24BuildRequires: python-keyring
1758bfc3 25BuildRequires: python-pytest >= 3.0.0
d1e48991 26BuildRequires: python-pytest-cov
2e60e376 27%endif
9739dc1f
ER
28%endif
29%if %{with python3}
1758bfc3
JB
30BuildRequires: python3-devel >= 1:3.5
31BuildRequires: python3-setuptools >= 1:40.9.0
2e60e376 32%if %{with tests}
9739dc1f 33BuildRequires: python3-keyring
1758bfc3 34BuildRequires: python3-pytest >= 3.0.0
d1e48991 35BuildRequires: python3-pytest-cov
2e60e376 36%endif
9739dc1f 37%endif
1758bfc3
JB
38%if %{with doc}
39BuildRequires: sphinx-pdg
40%endif
d1e48991
JB
41BuildRequires: rpm-pythonprov
42BuildRequires: rpmbuild(macros) >= 1.714
9739dc1f
ER
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47A built-package format for Python.
48
49A wheel is a ZIP-format archive with a specially formatted filename
50and the .whl extension. It is designed to contain all the files for a
51PEP 376 compatible install in a way that is very close to the on-disk
52format.
53
2e60e376
JB
54%description -l pl.UTF-8
55Format zbudowanych pakietów dla Pythona.
56
57"wheel" to archiwum w formacie ZIP ze specjalnie sformatowaną nazwą
58pliku oraz rozszerzeniem ".whl". Jest zaprojektowane, aby zawierało
59wszystkie pliki instalacji zgodnej z PEP 376 w sposób bardzo zbliżony
60do formatu na dysku.
61
9739dc1f
ER
62%package -n python3-%{module}
63Summary: A built-package format for Python
2e60e376 64Summary(pl.UTF-8): Format zbudowanych pakietów dla Pythona
9739dc1f 65Group: Libraries/Python
1758bfc3
JB
66# /usr/bin/wheel migration
67Conflicts: python-wheel < 0.37.1
9739dc1f
ER
68
69%description -n python3-%{module}
70A built-package format for Python.
71
72A wheel is a ZIP-format archive with a specially formatted filename
73and the .whl extension. It is designed to contain all the files for a
74PEP 376 compatible install in a way that is very close to the on-disk
75format.
76
2e60e376
JB
77%description -n python3-%{module} -l pl.UTF-8
78Format zbudowanych pakietów dla Pythona.
79
80"wheel" to archiwum w formacie ZIP ze specjalnie sformatowaną nazwą
81pliku oraz rozszerzeniem ".whl". Jest zaprojektowane, aby zawierało
82wszystkie pliki instalacji zgodnej z PEP 376 w sposób bardzo zbliżony
83do formatu na dysku.
9739dc1f 84
1758bfc3
JB
85%package apidocs
86Summary: API documentation for Python wheel module
87Summary(pl.UTF-8): Dokumentacja API modułu Pythona wheel
88Group: Documentation
89
90%description apidocs
91API documentation for Python wheel module.
92
93%description apidocs -l pl.UTF-8
94Dokumentacja API modułu Pythona wheel.
95
9739dc1f
ER
96%prep
97%setup -q -n %{module}-%{version}
98
9739dc1f
ER
99%build
100%if %{with python2}
afce17e6 101%py_build
2e60e376
JB
102
103%if %{with tests}
1758bfc3
JB
104PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
105PYTEST_PLUGINS="pytest_cov.plugin" \
106PYTHONPATH=$(pwd)/src \
107%{__python} -m pytest tests -k 'not test_macosx_libfile'
2e60e376 108%endif
9739dc1f
ER
109%endif
110
111%if %{with python3}
afce17e6 112%py3_build
9739dc1f 113
2e60e376 114%if %{with tests}
1758bfc3
JB
115PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
116PYTEST_PLUGINS="pytest_cov.plugin" \
117PYTHONPATH=$(pwd)/src \
118%{__python3} -m pytest tests -k 'not test_macosx_libfile'
9739dc1f 119%endif
9739dc1f
ER
120%endif
121
1758bfc3
JB
122%if %{with doc}
123%{__make} -C docs html
124%endif
9739dc1f
ER
125
126%install
127rm -rf $RPM_BUILD_ROOT
9739dc1f
ER
128
129%if %{with python2}
afce17e6 130%py_install
1758bfc3 131
2e60e376 132%{__mv} $RPM_BUILD_ROOT%{_bindir}/wheel{,-2}
9739dc1f 133
9739dc1f
ER
134%py_postclean
135%endif
136
1758bfc3
JB
137%if %{with python3}
138%py3_install
139
140%{__mv} $RPM_BUILD_ROOT%{_bindir}/wheel{,-3}
141ln -sf wheel-3 $RPM_BUILD_ROOT%{_bindir}/wheel
142%endif
143
144%clean
145rm -rf $RPM_BUILD_ROOT
146
9739dc1f
ER
147%if %{with python2}
148%files
149%defattr(644,root,root,755)
9282f87c 150%doc LICENSE.txt README.rst
2e60e376 151%attr(755,root,root) %{_bindir}/wheel-2
9739dc1f
ER
152%{py_sitescriptdir}/wheel
153%{py_sitescriptdir}/wheel-%{version}-py*.egg-info
154%endif
155
156%if %{with python3}
157%files -n python3-%{module}
158%defattr(644,root,root,755)
9282f87c 159%doc LICENSE.txt README.rst
1758bfc3 160%attr(755,root,root) %{_bindir}/wheel
2e60e376
JB
161%attr(755,root,root) %{_bindir}/wheel-3
162%{py3_sitescriptdir}/wheel
163%{py3_sitescriptdir}/wheel-%{version}-py*.egg-info
9739dc1f 164%endif
1758bfc3
JB
165
166%if %{with doc}
167%files apidocs
168%defattr(644,root,root,755)
169%doc docs/_build/html/{_static,reference,*.html,*.js}
170%endif
This page took 0.148129 seconds and 4 git commands to generate.