3 %bcond_without python2 # Python 2 package
4 %bcond_without python3 # Python 3 package
6 %define module html2text
7 Summary: A HTML to markdown-structured text converter
12 Group: Libraries/Python
13 Source0: https://pypi.python.org/packages/source/h/html2text/%{module}-%{version}.tar.gz
14 # Source0-md5: 165c314c5957cc8cf847c9a8cac3e4d2
15 URL: https://github.com/Alir3z4/html2text/
17 BuildRequires: python-modules
20 BuildRequires: python3-Cython
21 BuildRequires: python3-modules
22 BuildRequires: python3-setuptools
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.219
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 A HTML to markdown-structured text converter.
32 %package -n python3-%{module}
33 Summary: A HTML to markdown-structured text converter
34 Group: Libraries/Python
36 %description -n python3-%{module}
37 A HTML to markdown-structured text converter.
40 %setup -q -n %{module}-%{version}
44 %{__python} setup.py build
47 %{__python3} setup.py build
51 rm -rf $RPM_BUILD_ROOT
54 %{__python} setup.py \
56 --root=$RPM_BUILD_ROOT \
63 %{__python3} setup.py \
65 --root=$RPM_BUILD_ROOT \
70 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
75 %dir %{py_sitescriptdir}/html2text
76 %{py_sitescriptdir}/html2text/*.py[co]
77 %{py_sitescriptdir}/html2text-*.egg-info
81 %files -n python3-%{module}
82 %defattr(644,root,root,755)
83 %dir %{py3_sitescriptdir}/html2text
84 %{py3_sitescriptdir}/html2text/*.py
85 %{py3_sitescriptdir}/html2text/__pycache__
86 %{py3_sitescriptdir}/html2text-*.egg-info