Create python-wheel-wheel package with the wheel of wheel
Also, drop the python3 conditional
This commit is contained in:
parent
3e16f93576
commit
2e315e2b4a
@ -1,20 +1,16 @@
|
|||||||
# Note that the only function of bootstrap is that it disables the test suite:
|
# Note that the function of bootstrap is that it disables the test suite and whl
|
||||||
# bcond_with bootstrap = tests enabled
|
# bcond_with bootstrap = tests enabled, package with whl created
|
||||||
%bcond_with bootstrap
|
%bcond_with bootstrap
|
||||||
|
|
||||||
%bcond_without python2
|
%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 pypi_name wheel
|
||||||
|
%global python_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl
|
||||||
|
%global python_wheeldir %{_datadir}/python-wheels
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 0.31.1
|
Version: 0.31.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Built-package format for Python
|
Summary: Built-package format for Python
|
||||||
|
|
||||||
@ -59,12 +55,11 @@ Python 2 version.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%package -n python3-%{pypi_name}
|
%package -n python3-%{pypi_name}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
%if ! %{with bootstrap}
|
%if %{without bootstrap}
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
BuildRequires: python3-pyxdg
|
BuildRequires: python3-pyxdg
|
||||||
BuildRequires: python3-keyring
|
BuildRequires: python3-keyring
|
||||||
@ -74,6 +69,14 @@ BuildRequires: python3-keyring
|
|||||||
%description -n python3-%{pypi_name} %{_description}
|
%description -n python3-%{pypi_name} %{_description}
|
||||||
|
|
||||||
Python 3 version.
|
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
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -87,17 +90,17 @@ sed -ie '1d' %{pypi_name}/{egg2wheel,wininst2wheel}.py
|
|||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
%endif
|
%endif
|
||||||
%if %{with python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
|
%if %{without bootstrap}
|
||||||
|
%py3_build_wheel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python3}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
|
mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
|
||||||
ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
|
ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%py2_install
|
%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}
|
ln -s %{pypi_name}-2 %{buildroot}%{_bindir}/%{pypi_name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! %{with bootstrap}
|
%if %{without bootstrap}
|
||||||
|
mkdir -p %{buildroot}%{python_wheeldir}
|
||||||
|
install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
rm setup.cfg
|
rm setup.cfg
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -v --ignore build
|
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -v --ignore build
|
||||||
%endif
|
%endif
|
||||||
%if %{with python3}
|
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
|
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%files -n python2-%{pypi_name}
|
%files -n python2-%{pypi_name}
|
||||||
@ -128,16 +133,25 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
|
|||||||
%{python2_sitelib}/%{pypi_name}*
|
%{python2_sitelib}/%{pypi_name}*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc CHANGES.txt README.rst
|
%doc CHANGES.txt README.rst
|
||||||
%{_bindir}/%{pypi_name}-3
|
%{_bindir}/%{pypi_name}-3
|
||||||
%{_bindir}/%{pypi_name}-%{python3_version}
|
%{_bindir}/%{pypi_name}-%{python3_version}
|
||||||
%{python3_sitelib}/%{pypi_name}*
|
%{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
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1:0.31.1-3
|
||||||
|
- Create python-wheel-wheel package with the wheel of wheel
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.31.1-2
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.31.1-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user