%global _empty_manifest_terminate_build 0 Name: python-docstring-to-markdown Version: 0.12 Release: 1 Summary: On the fly conversion of Python docstrings to markdown License: LGPL-2.1-or-later URL: https://pypi.org/project/docstring-to-markdown/ Source0: https://mirrors.nju.edu.cn/pypi/web/packages/52/c2/6f73c08b97bacd1242835bdca1cfc123b059eb15af9350eb1eb5d58868fc/docstring-to-markdown-0.12.tar.gz BuildArch: noarch %description # docstring-to-markdown [![tests](https://github.com/python-lsp/docstring-to-markdown/workflows/tests/badge.svg)](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22) ![CodeQL](https://github.com/python-lsp/docstring-to-markdown/workflows/CodeQL/badge.svg) [![pypi-version](https://img.shields.io/pypi/v/docstring-to-markdown.svg)](https://python.org/pypi/docstring-to-markdown) On the fly conversion of Python docstrings to markdown - Python 3.6+ - currently can recognise reStructuredText and convert multiple of its features to Markdown - in the future will be able to convert Google docstrings too ### Installation ```bash pip install docstring-to-markdown ``` ### Example Convert reStructuredText: ```python >>> import docstring_to_markdown >>> docstring_to_markdown.convert(':math:`\\sum`') '$\\sum$' ``` When given the format cannot be recognised an exception will be raised: ```python >>> docstring_to_markdown.convert('\\sum') Traceback (most recent call last): raise UnknownFormatError() docstring_to_markdown.UnknownFormatError ``` ### Development ```bash pip install -e . pytest ``` %package -n python3-docstring-to-markdown Summary: On the fly conversion of Python docstrings to markdown Provides: python-docstring-to-markdown BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-docstring-to-markdown # docstring-to-markdown [![tests](https://github.com/python-lsp/docstring-to-markdown/workflows/tests/badge.svg)](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22) ![CodeQL](https://github.com/python-lsp/docstring-to-markdown/workflows/CodeQL/badge.svg) [![pypi-version](https://img.shields.io/pypi/v/docstring-to-markdown.svg)](https://python.org/pypi/docstring-to-markdown) On the fly conversion of Python docstrings to markdown - Python 3.6+ - currently can recognise reStructuredText and convert multiple of its features to Markdown - in the future will be able to convert Google docstrings too ### Installation ```bash pip install docstring-to-markdown ``` ### Example Convert reStructuredText: ```python >>> import docstring_to_markdown >>> docstring_to_markdown.convert(':math:`\\sum`') '$\\sum$' ``` When given the format cannot be recognised an exception will be raised: ```python >>> docstring_to_markdown.convert('\\sum') Traceback (most recent call last): raise UnknownFormatError() docstring_to_markdown.UnknownFormatError ``` ### Development ```bash pip install -e . pytest ``` %package help Summary: Development documents and examples for docstring-to-markdown Provides: python3-docstring-to-markdown-doc %description help # docstring-to-markdown [![tests](https://github.com/python-lsp/docstring-to-markdown/workflows/tests/badge.svg)](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22) ![CodeQL](https://github.com/python-lsp/docstring-to-markdown/workflows/CodeQL/badge.svg) [![pypi-version](https://img.shields.io/pypi/v/docstring-to-markdown.svg)](https://python.org/pypi/docstring-to-markdown) On the fly conversion of Python docstrings to markdown - Python 3.6+ - currently can recognise reStructuredText and convert multiple of its features to Markdown - in the future will be able to convert Google docstrings too ### Installation ```bash pip install docstring-to-markdown ``` ### Example Convert reStructuredText: ```python >>> import docstring_to_markdown >>> docstring_to_markdown.convert(':math:`\\sum`') '$\\sum$' ``` When given the format cannot be recognised an exception will be raised: ```python >>> docstring_to_markdown.convert('\\sum') Traceback (most recent call last): raise UnknownFormatError() docstring_to_markdown.UnknownFormatError ``` ### Development ```bash pip install -e . pytest ``` %prep %autosetup -n docstring-to-markdown-0.12 %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-docstring-to-markdown -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 11 2023 Python_Bot - 0.12-1 - Package Spec generated