]> git.pld-linux.org Git - packages/python-html2text.git/blob - python-html2text.spec
- noarch
[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:        2014.12.5
10 Release:        1
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:  165c314c5957cc8cf847c9a8cac3e4d2
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.219
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 %{__python} setup.py build
45 %endif
46 %if %{with python3}
47 %{__python3} setup.py build
48 %endif
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 %if %{with python2}
54 %{__python} setup.py \
55         install \
56         --root=$RPM_BUILD_ROOT \
57         --optimize=2
58
59 %py_postclean
60 %endif
61
62 %if %{with python3}
63 %{__python3} setup.py \
64         install \
65         --root=$RPM_BUILD_ROOT \
66         --optimize=2
67 %endif
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %if %{with python2}
73 %files
74 %defattr(644,root,root,755)
75 %dir %{py_sitescriptdir}/html2text
76 %{py_sitescriptdir}/html2text/*.py[co]
77 %{py_sitescriptdir}/html2text-*.egg-info
78 %endif
79
80 %if %{with python3}
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
87 %endif
This page took 0.117569 seconds and 3 git commands to generate.