Build python3-html2text on epel 7 (#1740322)
Drop python2 on Fedora >= 31 (#1741010)
This commit is contained in:
parent
48417cef23
commit
2cfeed6b36
1 changed files with 20 additions and 3 deletions
|
|
@ -1,4 +1,10 @@
|
||||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 16
|
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 30)
|
||||||
|
%bcond_without python2
|
||||||
|
%else
|
||||||
|
%bcond_with python2
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 16
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
%else
|
%else
|
||||||
%bcond_with python3
|
%bcond_with python3
|
||||||
|
|
@ -42,18 +48,19 @@ Obsoletes: %{upname} <= 1.3.2a-17
|
||||||
%{common_desc}
|
%{common_desc}
|
||||||
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%package -n python3-%{upname}
|
%package -n python3-%{upname}
|
||||||
Summary: %{common_sum}
|
Summary: %{common_sum}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
Provides: %{upname} = %{version}-%{release}
|
Provides: %{upname} = %{version}-%{release}
|
||||||
Obsoletes: %{upname} <= 1.3.2a-17
|
Obsoletes: %{upname} <= 1.3.2a-17
|
||||||
|
%if !%{with python2}
|
||||||
|
Obsoletes: python2-%{upname} <= %{version}-%{release}
|
||||||
|
%endif
|
||||||
%{?python_provide:%python_provide python3-%{upname}}
|
%{?python_provide:%python_provide python3-%{upname}}
|
||||||
|
|
||||||
%description -n python3-%{upname}
|
%description -n python3-%{upname}
|
||||||
%{common_desc}
|
%{common_desc}
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
|
@ -62,18 +69,22 @@ Obsoletes: %{upname} <= 1.3.2a-17
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{with python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
|
%endif
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{with python2}
|
||||||
%{__mkdir} -p %{buildroot}%{_mandir}/man1
|
%{__mkdir} -p %{buildroot}%{_mandir}/man1
|
||||||
%py2_install
|
%py2_install
|
||||||
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/python2-%{upname}
|
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/python2-%{upname}
|
||||||
export PYTHONPATH="%{buildroot}%{python2_sitelib}"
|
export PYTHONPATH="%{buildroot}%{python2_sitelib}"
|
||||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/python2-%{upname}.1 %{buildroot}%{_bindir}/python2-%{upname}
|
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/python2-%{upname}.1 %{buildroot}%{_bindir}/python2-%{upname}
|
||||||
|
%endif
|
||||||
%if !%{with python3}
|
%if !%{with python3}
|
||||||
pushd %{buildroot}%{_bindir}
|
pushd %{buildroot}%{_bindir}
|
||||||
ln -s python2-%{upname} %{upname}
|
ln -s python2-%{upname} %{upname}
|
||||||
|
|
@ -102,12 +113,15 @@ popd
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with python2}
|
||||||
%{__python2} setup.py test -vv
|
%{__python2} setup.py test -vv
|
||||||
|
%endif
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%{__python3} setup.py test -vv
|
%{__python3} setup.py test -vv
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%files -n python2-%{upname}
|
%files -n python2-%{upname}
|
||||||
%license AUTHORS.* COPYING
|
%license AUTHORS.* COPYING
|
||||||
%doc README.* ChangeLog.* PKG-INFO
|
%doc README.* ChangeLog.* PKG-INFO
|
||||||
|
|
@ -121,6 +135,7 @@ popd
|
||||||
%endif
|
%endif
|
||||||
%{python2_sitelib}/%{upname}
|
%{python2_sitelib}/%{upname}
|
||||||
%{python2_sitelib}/%{upname}-%{version}-py%{python2_version}.egg-info
|
%{python2_sitelib}/%{upname}-%{version}-py%{python2_version}.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
|
|
@ -141,6 +156,8 @@ popd
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Sep 09 2019 Sérgio Basto <sergio@serjux.com> - 2019.8.11-1
|
* Mon Sep 09 2019 Sérgio Basto <sergio@serjux.com> - 2019.8.11-1
|
||||||
- Update to 2019.8.11
|
- Update to 2019.8.11
|
||||||
|
- Build python3-html2text on epel 7 (#1740322)
|
||||||
|
- Drop python2 on Fedora >= 31 (#1741010)
|
||||||
|
|
||||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2018.1.9-3
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2018.1.9-3
|
||||||
- Rebuilt for Python 3.8
|
- Rebuilt for Python 3.8
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue