]> git.pld-linux.org Git - packages/python-html2text.git/blob - python-html2text.spec
7d49daa821520a4c41ec0c9e454e6f755d492d10
[packages/python-html2text.git] / python-html2text.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # Python 2 package
4 %bcond_without  python3         # Python 3 package
5
6 %define         module  html2text
7 Summary:        A HTML to markdown-structured text converter
8 Name:           python-%{module}
9 Version:        2016.4.2
10 Release:        3
11 License:        GPL v3
12 Group:          Libraries/Python
13 Source0:        https://pypi.python.org/packages/source/h/html2text/%{module}-%{version}.tar.gz
14 # Source0-md5:  a1d59f137d0b15105d79b08f2325477c
15 URL:            https://github.com/Alir3z4/html2text/
16 %if %{with python2}
17 BuildRequires:  python-modules
18 %endif
19 %if %{with python3}
20 BuildRequires:  python3-Cython
21 BuildRequires:  python3-modules
22 BuildRequires:  python3-setuptools
23 %endif
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.710
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 A HTML to markdown-structured text converter.
31
32 %package -n python3-%{module}
33 Summary:        A HTML to markdown-structured text converter
34 Group:          Libraries/Python
35
36 %description -n python3-%{module}
37 A HTML to markdown-structured text converter.
38
39 %prep
40 %setup -q -n %{module}-%{version}
41
42 %build
43 %if %{with python2}
44 %py_build
45 %endif
46 %if %{with python3}
47 %py3_build
48 %endif
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 %if %{with python2}
54 %py_install
55
56 %py_postclean
57 %endif
58
59 %if %{with python3}
60 %py3_install
61 %endif
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %if %{with python2}
67 %files
68 %defattr(644,root,root,755)
69 %dir %{py_sitescriptdir}/html2text
70 %{py_sitescriptdir}/html2text/*.py[co]
71 %{py_sitescriptdir}/html2text-*.egg-info
72 %endif
73
74 %if %{with python3}
75 %files -n python3-%{module}
76 %defattr(644,root,root,755)
77 %dir %{py3_sitescriptdir}/html2text
78 %{py3_sitescriptdir}/html2text/*.py
79 %{py3_sitescriptdir}/html2text/__pycache__
80 %{py3_sitescriptdir}/html2text-*.egg-info
81 %endif
This page took 0.060155 seconds and 2 git commands to generate.