[packages/python-html2text] - new

atler atler at pld-linux.org
Sun Dec 7 12:54:01 CET 2014


commit eef5230781f4cc16ff3c86ed9d72378b4e7a04be
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Dec 7 12:53:09 2014 +0100

    - new

 python-html2text.spec | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
---
diff --git a/python-html2text.spec b/python-html2text.spec
new file mode 100644
index 0000000..d4b9ee2
--- /dev/null
+++ b/python-html2text.spec
@@ -0,0 +1,86 @@
+#
+# Conditional build:
+%bcond_without	python2		# Python 2 package
+%bcond_without	python3		# Python 3 package
+
+%define		module	html2text
+Summary:	A HTML to markdown-structured text converter
+Name:		python-%{module}
+Version:	2014.12.5
+Release:	1
+License:	GPL v3
+Group:		Libraries/Python
+Source0:	https://pypi.python.org/packages/source/h/html2text/%{module}-%{version}.tar.gz
+# Source0-md5:	165c314c5957cc8cf847c9a8cac3e4d2
+URL:		https://github.com/Alir3z4/html2text/
+%if %{with python2}
+BuildRequires:	python-modules
+%endif
+%if %{with python3}
+BuildRequires:	python3-Cython
+BuildRequires:	python3-modules
+BuildRequires:	python3-setuptools
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A HTML to markdown-structured text converter.
+
+%package -n python3-%{module}
+Summary:	A HTML to markdown-structured text converter
+Group:		Libraries/Python
+
+%description -n python3-%{module}
+A HTML to markdown-structured text converter.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%if %{with python2}
+%{__python} setup.py build
+%endif
+%if %{with python3}
+%{__python3} setup.py build
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+	install \
+	--root=$RPM_BUILD_ROOT \
+	--optimize=2
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+	install \
+	--root=$RPM_BUILD_ROOT \
+	--optimize=2
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%dir %{py_sitescriptdir}/html2text
+%{py_sitescriptdir}/html2text/*.py[co]
+%{py_sitescriptdir}/html2text-*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%dir %{py3_sitescriptdir}/html2text
+%{py3_sitescriptdir}/html2text/*.py
+%{py3_sitescriptdir}/html2text/__pycache__
+%{py3_sitescriptdir}/html2text-*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-html2text.git/commitdiff/eef5230781f4cc16ff3c86ed9d72378b4e7a04be



More information about the pld-cvs-commit mailing list