%global _empty_manifest_terminate_build 0
Name: python-Markups
Version: 4.0.0
Release: 1
Summary: A wrapper around various text markups
License: BSD 3-Clause License
URL: https://github.com/retext-project/pymarkups
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/10/b7/ec51da3ed9d0a93fba71c41bdef26065f78bed7e760b4fa7687283b79955/Markups-4.0.0.tar.gz
BuildArch: noarch
Requires: python3-markdown-math
Requires: python3-asciidoc
Requires: python3-lxml
Requires: python3-Pygments
Requires: python3-Markdown
Requires: python3-PyYAML
Requires: python3-docutils
Requires: python3-textile
%description
.. image:: https://github.com/retext-project/pymarkups/workflows/tests/badge.svg
:target: https://github.com/retext-project/pymarkups/actions
:alt: GitHub Actions status
.. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg
:target: https://codecov.io/gh/retext-project/pymarkups
:alt: Coverage status
.. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest
:target: https://pymarkups.readthedocs.io/en/latest/
:alt: ReadTheDocs status
This module provides a wrapper around various text markup languages.
Available by default are Markdown_, reStructuredText_, Textile_ and AsciiDoc_,
but you can easily add your own markups.
Usage example:
.. code:: python
>>> import markups
>>> markup = markups.get_markup_for_file_name("myfile.rst")
>>> markup.name
'reStructuredText'
>>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
'https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html'
>>> text = """
... Hello, world!
... =============
...
... This is an example **reStructuredText** document.
... """
>>> result = markup.convert(text)
>>> result.get_document_title()
'Hello, world!'
>>> print(result.get_document_body()) # doctest: +NORMALIZE_WHITESPACE
Hello, world!
This is an example reStructuredText document.
.. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)
.. _AsciiDoc: https://asciidoc.org
The release version can be downloaded from PyPI_ or installed using::
pip install Markups
.. _PyPI: https://pypi.org/project/Markups/
The source code is hosted on GitHub_.
.. _GitHub: https://github.com/retext-project/pymarkups
The documentation is available online_ or can be generated from source by
installing Sphinx_ and running::
python3 -m sphinx docs build/sphinx/html
.. _online: https://pymarkups.readthedocs.io/en/latest/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
%package -n python3-Markups
Summary: A wrapper around various text markups
Provides: python-Markups
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-Markups
.. image:: https://github.com/retext-project/pymarkups/workflows/tests/badge.svg
:target: https://github.com/retext-project/pymarkups/actions
:alt: GitHub Actions status
.. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg
:target: https://codecov.io/gh/retext-project/pymarkups
:alt: Coverage status
.. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest
:target: https://pymarkups.readthedocs.io/en/latest/
:alt: ReadTheDocs status
This module provides a wrapper around various text markup languages.
Available by default are Markdown_, reStructuredText_, Textile_ and AsciiDoc_,
but you can easily add your own markups.
Usage example:
.. code:: python
>>> import markups
>>> markup = markups.get_markup_for_file_name("myfile.rst")
>>> markup.name
'reStructuredText'
>>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
'https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html'
>>> text = """
... Hello, world!
... =============
...
... This is an example **reStructuredText** document.
... """
>>> result = markup.convert(text)
>>> result.get_document_title()
'Hello, world!'
>>> print(result.get_document_body()) # doctest: +NORMALIZE_WHITESPACE
Hello, world!
This is an example reStructuredText document.
.. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)
.. _AsciiDoc: https://asciidoc.org
The release version can be downloaded from PyPI_ or installed using::
pip install Markups
.. _PyPI: https://pypi.org/project/Markups/
The source code is hosted on GitHub_.
.. _GitHub: https://github.com/retext-project/pymarkups
The documentation is available online_ or can be generated from source by
installing Sphinx_ and running::
python3 -m sphinx docs build/sphinx/html
.. _online: https://pymarkups.readthedocs.io/en/latest/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
%package help
Summary: Development documents and examples for Markups
Provides: python3-Markups-doc
%description help
.. image:: https://github.com/retext-project/pymarkups/workflows/tests/badge.svg
:target: https://github.com/retext-project/pymarkups/actions
:alt: GitHub Actions status
.. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg
:target: https://codecov.io/gh/retext-project/pymarkups
:alt: Coverage status
.. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest
:target: https://pymarkups.readthedocs.io/en/latest/
:alt: ReadTheDocs status
This module provides a wrapper around various text markup languages.
Available by default are Markdown_, reStructuredText_, Textile_ and AsciiDoc_,
but you can easily add your own markups.
Usage example:
.. code:: python
>>> import markups
>>> markup = markups.get_markup_for_file_name("myfile.rst")
>>> markup.name
'reStructuredText'
>>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
'https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html'
>>> text = """
... Hello, world!
... =============
...
... This is an example **reStructuredText** document.
... """
>>> result = markup.convert(text)
>>> result.get_document_title()
'Hello, world!'
>>> print(result.get_document_body()) # doctest: +NORMALIZE_WHITESPACE
Hello, world!
This is an example reStructuredText document.
.. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)
.. _AsciiDoc: https://asciidoc.org
The release version can be downloaded from PyPI_ or installed using::
pip install Markups
.. _PyPI: https://pypi.org/project/Markups/
The source code is hosted on GitHub_.
.. _GitHub: https://github.com/retext-project/pymarkups
The documentation is available online_ or can be generated from source by
installing Sphinx_ and running::
python3 -m sphinx docs build/sphinx/html
.. _online: https://pymarkups.readthedocs.io/en/latest/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
%prep
%autosetup -n Markups-4.0.0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-Markups -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri Apr 21 2023 Python_Bot - 4.0.0-1
- Package Spec generated