File python-rst2html5.spec of Package python-rst2html5
%if 0%{?fedora} >= 22
%global with_python3 1
%endif
%define unmangled_name rst2html5
Summary: Generates (X)HTML5 documents from standalone reStructuredText sources
Name: python-%{unmangled_name}
Version: 1.7.5
Release: 1%{?dist}
Source0: https://pypi.python.org/packages/source/r/%{unmangled_name}/%{unmangled_name}-%{version}.tar.gz
License: MIT
Group: Development/Libraries
Prefix: %{_prefix}
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-docutils
BuildRequires: python-genshi
BuildRequires: python-pygments
BuildRequires: python-beautifulsoup4
BuildRequires: python-nose
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-docutils
BuildRequires: python3-genshi
BuildRequires: python3-pygments
BuildRequires: python3-beautifulsoup4
BuildRequires: python3-nose
%endif
Vendor: André Felipe Dias <andref.dias@gmail.com>
Url: https://bitbucket.org/andre_felipe_dias/rst2html5
%description
rst2html5 generates (X)HTML5 documents from standalone reStructuredText sources.
It is a complete rewrite of the docutils' rst2html and uses new HTML5 constructs
such as
<section> and <aside>.
%package -n python2-%{unmangled_name}
Summary: Generates (X)HTML5 documents from standalone reStructuredText sources
Group: Development/Libraries
Requires: python-docutils
Requires: python-genshi
Requires: python-pygments
%{?python_provide:%python_provide python2-%{unmangled_name}}
%description -n python2-%{unmangled_name}
rst2html5 generates (X)HTML5 documents from standalone reStructuredText sources.
It is a complete rewrite of the docutils' rst2html and uses new HTML5 constructs
such as
<section> and <aside>.
This package contains the python2 version of this module.
%if 0%{?with_python3}
%package -n python3-%{unmangled_name}
Summary: Generates (X)HTML5 documents from standalone reStructuredText sources
Group: Development/Libraries
Requires: python3-docutils
Requires: python3-genshi
Requires: python3-pygments
%{?python_provide:%python_provide python3-%{unmangled_name}}
%description -n python3-%{unmangled_name}
rst2html5 generates (X)HTML5 documents from standalone reStructuredText sources.
It is a complete rewrite of the docutils' rst2html and uses new HTML5 constructs
such as
<section> and <aside>.
This package contains the python3 version of this module.
%endif
%prep
%setup -n %{unmangled_name}-%{version}
%{__mkdir_p} src/rst2html5
%{__mv} src/rst2html5.py src/rst2html5/__init__.py
%{__mv} src/modules src/rst2html5/modules
%{__sed} -i 's/^from modules/from .modules/' src/rst2html5/__init__.py
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
%if 0%{?with_python3}
%py3_install
%endif
%py2_install
%check
%{__python2} %{py_setup} test
%if 0%{?with_python3}
%{__python3} %{py_setup} test
%endif
%files -n python2-%{unmangled_name}
%license LICENSE
%doc *.rst
%{python2_sitelib}/%{unmangled_name}
%{python2_sitelib}/%{unmangled_name}-%{version}-py?.?.egg-info
%{_bindir}/*
%if 0%{?with_python3}
%files -n python3-%{unmangled_name}
%license LICENSE
%doc *.rst
%{python3_sitelib}/%{unmangled_name}
%{python3_sitelib}/%{unmangled_name}-%{version}-py?.?.egg-info
%endif