|
|
|
|
@ -1,230 +1,100 @@
|
|
|
|
|
%global upname html2text
|
|
|
|
|
%global common_sum Convert HTML to Markdown-formatted text
|
|
|
|
|
%global common_desc %{upname} is a Python script that converts a page \
|
|
|
|
|
of HTML into clean, easy-to-read plain ASCII text. Better yet, that ASCII \
|
|
|
|
|
also happens to be valid Markdown (a text-to-HTML format).
|
|
|
|
|
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 16
|
|
|
|
|
%bcond_without python3
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with python3
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
|
|
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
|
|
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
|
|
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global upname html2text
|
|
|
|
|
|
|
|
|
|
Name: python-%{upname}
|
|
|
|
|
Version: 2025.4.15
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Summary: %{common_sum}
|
|
|
|
|
Version: 2015.6.6
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Summary: Converts a page of HTML into plain ASCII text
|
|
|
|
|
|
|
|
|
|
License: GPL-3.0-or-later
|
|
|
|
|
URL: https://github.com/Alir3z4/%{upname}/
|
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/h/%{upname}/%{upname}-%{version}.tar.gz
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
License: GPLv3
|
|
|
|
|
URL: http://alir3z4.github.io/html2text/
|
|
|
|
|
Source0: https://pypi.python.org/packages/source/h/%{upname}/%{upname}-%{version}.tar.gz
|
|
|
|
|
Provides: html2text = %{version}-%{release}
|
|
|
|
|
Obsoletes: html2text <= 1.3.2a-16
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: help2man
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python-devel
|
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
%{common_desc}
|
|
|
|
|
html2text is a Python script that converts a page of HTML into clean,
|
|
|
|
|
easy-to-read plain ASCII text. Better yet, that ASCII also happens to
|
|
|
|
|
be valid Markdown (a text-to-HTML format).
|
|
|
|
|
|
|
|
|
|
Also known as: THE ASCIINATOR, html to text, htm to txt, htm2txt, ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%package -n python3-%{upname}
|
|
|
|
|
Summary: %{common_sum}
|
|
|
|
|
Provides: %{upname} = %{version}-%{release}
|
|
|
|
|
Obsoletes: python2-%{upname} <= %{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python3-%{upname}}
|
|
|
|
|
Summary: Easily build and distribute Python 3 packages
|
|
|
|
|
Group: Applications/System
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{upname}
|
|
|
|
|
%{common_desc}
|
|
|
|
|
html2text is a Python script that converts a page of HTML into clean,
|
|
|
|
|
easy-to-read plain ASCII text. Better yet, that ASCII also happens to
|
|
|
|
|
be valid Markdown (a text-to-HTML format).
|
|
|
|
|
|
|
|
|
|
Also known as: THE ASCIINATOR, html to text, htm to txt, htm2txt, ...
|
|
|
|
|
|
|
|
|
|
This package contains python3 version of the package.
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{upname}-%{version}
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
%setup -q -n %{upname}-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files html2text
|
|
|
|
|
|
|
|
|
|
%{__mkdir} -p %{buildroot}%{_mandir}/man1
|
|
|
|
|
|
|
|
|
|
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/python3-%{upname}
|
|
|
|
|
export PYTHONPATH="%{buildroot}%{python3_sitelib}"
|
|
|
|
|
help2man --no-discard-stderr -s 1 -N -o %{buildroot}%{_mandir}/man1/python3-%{upname}.1 %{buildroot}%{_bindir}/python3-%{upname}
|
|
|
|
|
pushd %{buildroot}%{_bindir}
|
|
|
|
|
ln -s python3-%{upname} %{upname}
|
|
|
|
|
ln -s python3-%{upname} %{name}
|
|
|
|
|
popd
|
|
|
|
|
pushd %{buildroot}%{_mandir}/man1/
|
|
|
|
|
ln -s python3-%{upname}.1 %{upname}.1
|
|
|
|
|
ln -s python3-%{upname}.1 %{name}.1
|
|
|
|
|
popd
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%{__python3} setup.py install --root %{buildroot}
|
|
|
|
|
# we don't need second binary
|
|
|
|
|
rm -fv $RPM_BUILD_ROOT%{_bindir}/html2text
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{__python2} setup.py install --root %{buildroot}
|
|
|
|
|
# new script in 3.200.3 : conflicts with package' html2text' obviously
|
|
|
|
|
mv $RPM_BUILD_ROOT%{_bindir}/html2text $RPM_BUILD_ROOT%{_bindir}/%{name}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%pyproject_check_import
|
|
|
|
|
%{__python3} -m pytest
|
|
|
|
|
%pytest %{_builddir}
|
|
|
|
|
%{__python} setup.py test
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%{__python3} setup.py test || /bin/true
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{upname} -f %{pyproject_files}
|
|
|
|
|
%license AUTHORS.* COPYING
|
|
|
|
|
%doc README.* ChangeLog.* PKG-INFO
|
|
|
|
|
%{_bindir}/python3-%{upname}
|
|
|
|
|
%{_bindir}/%{upname}
|
|
|
|
|
%files
|
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
%{_mandir}/man1/python3-%{upname}.1*
|
|
|
|
|
%{_mandir}/man1/%{upname}.1*
|
|
|
|
|
%{_mandir}/man1/%{name}.1*
|
|
|
|
|
%{python2_sitelib}/*
|
|
|
|
|
%doc COPYING
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%files -n python3-%{upname}
|
|
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
%doc COPYING
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2025.4.15-5
|
|
|
|
|
- Rebuilt for Python 3.14.0rc3 bytecode
|
|
|
|
|
|
|
|
|
|
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2025.4.15-4
|
|
|
|
|
- Rebuilt for Python 3.14.0rc2 bytecode
|
|
|
|
|
|
|
|
|
|
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2025.4.15-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 2025.4.15-2
|
|
|
|
|
- Rebuilt for Python 3.14
|
|
|
|
|
|
|
|
|
|
* Wed May 21 2025 David Kaufmann <astra@ionic.at> - 2025.4.15-1
|
|
|
|
|
- Update to 2025.4.15
|
|
|
|
|
|
|
|
|
|
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2024.2.26-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 29 2024 Miroslav Suchý <msuchy@redhat.com> - 2024.2.26-4
|
|
|
|
|
- convert license to SPDX
|
|
|
|
|
|
|
|
|
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2024.2.26-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 2024.2.26-2
|
|
|
|
|
- Rebuilt for Python 3.13
|
|
|
|
|
|
|
|
|
|
* Tue Feb 27 2024 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 2024.2.26-1
|
|
|
|
|
- Update to 2024.2.26 (#2266431)
|
|
|
|
|
|
|
|
|
|
* Sun Feb 25 2024 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 2024.2.25-1
|
|
|
|
|
- Update to 2024.2.25 (#2265896)
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-12
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2020.1.16-9
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2020.1.16-6
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2020.1.16-3
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1.16-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Aug 07 2020 David Kaufmann <astra@ionic.at> - 2020.1.16-1
|
|
|
|
|
- Update to 2020.1.16
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.9.26-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2019.9.26-4
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.9.26-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Oct 29 2019 Sérgio Basto <sergio@serjux.com> - 2019.9.26-2
|
|
|
|
|
- Python3 only this version remove support for Python <= 3.4
|
|
|
|
|
|
|
|
|
|
* Tue Oct 29 2019 Sérgio Basto <sergio@serjux.com> - 2019.9.26-1
|
|
|
|
|
- Update to 2019.9.26
|
|
|
|
|
- Python3 only this version remove support for Python <= 3.4
|
|
|
|
|
|
|
|
|
|
* Mon Oct 21 2019 Miro Hrončok <mhroncok@redhat.com> - 2019.8.11-2
|
|
|
|
|
- Do not bring Python 2 BuildRequires when not building the Python 2 package
|
|
|
|
|
|
|
|
|
|
* Mon Sep 09 2019 Sérgio Basto <sergio@serjux.com> - 2019.8.11-1
|
|
|
|
|
- Update to 2019.8.11
|
|
|
|
|
- Build python3-html2text on epel 7 (#1740322)
|
|
|
|
|
- Drop python2 on Fedora >= 31 (#1741010)
|
|
|
|
|
- Remove Obsoletes: html2text (#1314105)
|
|
|
|
|
|
|
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2018.1.9-3
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.1.9-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Mar 28 2019 Sérgio Basto <sergio@serjux.com> - 2018.1.9-1
|
|
|
|
|
- Update to 2018.1.9
|
|
|
|
|
- Some cleanups, simplify spec and use symbol links
|
|
|
|
|
- Fix Obsoletes/Provides
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.19-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.19-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2016.9.19-6
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2016.9.19-5
|
|
|
|
|
- Update Python 2 dependency declarations to new packaging standards
|
|
|
|
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.19-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.19-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.19-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 25 2017 Björn Esser <besser82@fedoraproject.org> - 2016.9.19-1
|
|
|
|
|
- Update to latest upstream
|
|
|
|
|
- Package license and documentation
|
|
|
|
|
- Adapt to recent guidelines
|
|
|
|
|
- Fix other packaging issues
|
|
|
|
|
|
|
|
|
|
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2015.6.6-7
|
|
|
|
|
- Rebuild for Python 3.6
|
|
|
|
|
|
|
|
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2015.6.6-6
|
|
|
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
|
|
|
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2015.6.6-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Dec 07 2015 Matěj Cepl <mcepl@redhat.com> - 2015.6.6-4
|
|
|
|
|
- Provide/Obsolete html2text package. (#1288748)
|
|
|
|
|
- Temporarily switch off tests.
|
|
|
|
|
|