3 %bcond_with tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_with python3 # CPython 3.x module
8 Summary: A built-package format for Python
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/w/%{module}/%{module}-%{version}.tar.gz
15 # Source0-md5: 3b0d66f0d127ea8befaa5d11453107fd
16 URL: https://bitbucket.org/pypa/wheel
17 BuildRequires: rpmbuild(macros) >= 1.710
19 BuildRequires: python-argparse
20 BuildRequires: python-devel
21 BuildRequires: python-jsonschema
22 BuildRequires: python-keyring
23 BuildRequires: python-pytest
24 BuildRequires: python-setuptools
27 BuildRequires: python3-devel
28 BuildRequires: python3-jsonschema
29 BuildRequires: python3-keyring
30 BuildRequires: python3-pytest
31 BuildRequires: python3-setuptools
33 Requires: python-argparse
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 A built-package format for Python.
40 A wheel is a ZIP-format archive with a specially formatted filename
41 and the .whl extension. It is designed to contain all the files for a
42 PEP 376 compatible install in a way that is very close to the on-disk
45 %package -n python3-%{module}
46 Summary: A built-package format for Python
47 Group: Libraries/Python
49 %description -n python3-%{module}
50 A built-package format for Python.
52 A wheel is a ZIP-format archive with a specially formatted filename
53 and the .whl extension. It is designed to contain all the files for a
54 PEP 376 compatible install in a way that is very close to the on-disk
57 This is package contains Python 3 version of the package.
60 %setup -q -n %{module}-%{version}
62 # remove unneeded shebangs
63 sed -ie '1d' %{module}/{egg2wheel,wininst2wheel}.py
75 # remove setup.cfg that makes pytest require pytest-cov (unnecessary dep)
77 PYTHONPATH=build-2/lib py.test --ignore build -k 'not test_keygen'
79 # no test for Python 3, no python3-jsonschema yet
80 %if %{with python3} && 0
81 PYTHONPATH=build-3/lib py.test-%{py3_ver} --ignore build
87 rm -rf $RPM_BUILD_ROOT
90 rm -rf $RPM_BUILD_ROOT
94 cd $RPM_BUILD_ROOT%{_bindir}
95 for f in $(ls); do mv $f python3-$f; done
98 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/test
104 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/test
111 %defattr(644,root,root,755)
112 %doc LICENSE.txt CHANGES.txt README.txt
113 %attr(755,root,root) %{_bindir}/wheel
114 %{py_sitescriptdir}/wheel
115 %{py_sitescriptdir}/wheel-%{version}-py*.egg-info
119 %files -n python3-%{module}
120 %defattr(644,root,root,755)
121 %doc LICENSE.txt CHANGES.txt README.txt
122 %attr(755,root,root) %{__python}3-wheel
123 %{py3_sitescriptdir}/%{module}*