62 lines
1.9 KiB
RPMSpec
62 lines
1.9 KiB
RPMSpec
|
|
Name: python-m2r
|
||
|
|
Version: 0.1.15
|
||
|
|
Release: 3
|
||
|
|
Summary: A converter for markdown to reStructuredText
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/miyakogi/m2r
|
||
|
|
Source0: https://github.com/miyakogi/m2r/archive/v%{version}/m2r-%{version}.tar.gz
|
||
|
|
BuildArch: noarch
|
||
|
|
|
||
|
|
%description
|
||
|
|
The package converts a markdown file including reStructuredText (rst) markups to a valid rST format.
|
||
|
|
|
||
|
|
%package -n python2-m2r
|
||
|
|
BuildRequires: python2-devel python2-docutils python2-mistune python2-pygments python2-mock
|
||
|
|
Requires: python2-docutils python2-mistune
|
||
|
|
Summary: A converter for markdown to reStructuredText
|
||
|
|
%{?python_provide:%python_provide python2-m2r}
|
||
|
|
|
||
|
|
%description -n python2-m2r
|
||
|
|
The package converts a markdown file including reStructuredText (rst) markups to a valid rST format.
|
||
|
|
|
||
|
|
%package -n python3-m2r
|
||
|
|
BuildRequires: python3-devel python3-docutils python3-mistune python3-pygments python3-mock
|
||
|
|
Requires: python3-docutils python3-mistune
|
||
|
|
Summary: A converter for markdown to reStructuredText
|
||
|
|
%{?python_provide:%python_provide python3-m2r}
|
||
|
|
|
||
|
|
%description -n python3-m2r
|
||
|
|
The package converts a markdown file including reStructuredText (rst) markups to a valid rST format.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n m2r-%{version}
|
||
|
|
rm -rf m2r.egg-info
|
||
|
|
sed -i '1{\@^#!/usr/bin/env python@d}' m2r.py
|
||
|
|
|
||
|
|
%build
|
||
|
|
%py2_build
|
||
|
|
%py3_build
|
||
|
|
|
||
|
|
%install
|
||
|
|
%py2_install
|
||
|
|
%py3_install
|
||
|
|
|
||
|
|
%check
|
||
|
|
PYTHONPATH=$(pwd) %{__python2} setup.py test -s tests
|
||
|
|
PYTHONPATH=$(pwd) %{__python3} setup.py test -s tests
|
||
|
|
|
||
|
|
%files -n python2-m2r
|
||
|
|
%doc LICENSE README.md
|
||
|
|
%{python2_sitelib}/{m2r.py{,c,o},m2r-%{version}*-py%{python2_version}.egg-info}
|
||
|
|
%exclude %{python2_sitelib}/tests
|
||
|
|
|
||
|
|
%files -n python3-m2r
|
||
|
|
%doc LICENSE README.md
|
||
|
|
%{_bindir}/m2r
|
||
|
|
%{python3_sitelib}/{__pycache__/*,m2r.py,m2r-%{version}*-py%{python3_version}.egg-info}
|
||
|
|
%exclude %{python3_sitelib}/tests
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Wed Mar 11 2020 Ling Yang <lingyang2@huawei.com> - 0.1.15-3
|
||
|
|
- Package Init
|