diff --git a/python-wheel.spec b/python-wheel.spec index 022853f..566f18d 100644 --- a/python-wheel.spec +++ b/python-wheel.spec @@ -1,20 +1,16 @@ -# Note that the only function of bootstrap is that it disables the test suite: -# bcond_with bootstrap = tests enabled +# Note that the function of bootstrap is that it disables the test suite and whl +# bcond_with bootstrap = tests enabled, package with whl created %bcond_with bootstrap %bcond_without python2 -%if 0%{?rhel} && 0%{?rhel} <= 7 && 0%{!?epel:1} -# Note(hguemar): EL7 has no python3 stack but EPEL does -%bcond_with python3 -%else -%bcond_without python3 -%endif %global pypi_name wheel +%global python_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl +%global python_wheeldir %{_datadir}/python-wheels Name: python-%{pypi_name} Version: 0.31.1 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: Built-package format for Python @@ -59,12 +55,11 @@ Python 2 version. %endif -%if %{with python3} %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools -%if ! %{with bootstrap} +%if %{without bootstrap} BuildRequires: python3-pytest BuildRequires: python3-pyxdg BuildRequires: python3-keyring @@ -74,6 +69,14 @@ BuildRequires: python3-keyring %description -n python3-%{pypi_name} %{_description} Python 3 version. + + +%if %{without bootstrap} +%package wheel +Summary: The Python wheel module packaged as a wheel + +%description wheel +A Python wheel of wheel to use with virtualenv. %endif @@ -87,17 +90,17 @@ sed -ie '1d' %{pypi_name}/{egg2wheel,wininst2wheel}.py %if %{with python2} %py2_build %endif -%if %{with python3} %py3_build + +%if %{without bootstrap} +%py3_build_wheel %endif %install -%if %{with python3} %py3_install mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}} ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3 -%endif %if %{with python2} %py2_install @@ -106,17 +109,19 @@ ln -s %{pypi_name}-%{python2_version} %{buildroot}%{_bindir}/%{pypi_name}-2 ln -s %{pypi_name}-2 %{buildroot}%{_bindir}/%{pypi_name} %endif -%if ! %{with bootstrap} +%if %{without bootstrap} +mkdir -p %{buildroot}%{python_wheeldir} +install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} + + %check export LC_ALL=C.UTF-8 rm setup.cfg %if %{with python2} PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -v --ignore build %endif -%if %{with python3} PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build %endif -%endif %if %{with python2} %files -n python2-%{pypi_name} @@ -128,16 +133,25 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build %{python2_sitelib}/%{pypi_name}* %endif -%if %{with python3} %files -n python3-%{pypi_name} %license LICENSE.txt %doc CHANGES.txt README.rst %{_bindir}/%{pypi_name}-3 %{_bindir}/%{pypi_name}-%{python3_version} %{python3_sitelib}/%{pypi_name}* + +%if %{without bootstrap} +%files wheel +%license LICENSE.txt +# we own the dir for simplicity +%dir %{python_wheeldir}/ +%{python_wheeldir}/%{python_wheelname} %endif %changelog +* Wed Aug 15 2018 Miro HronĨok - 1:0.31.1-3 +- Create python-wheel-wheel package with the wheel of wheel + * Sat Jul 14 2018 Fedora Release Engineering - 1:0.31.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild