summaryrefslogtreecommitdiff
path: root/python-docstring-to-markdown.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 22:32:53 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 22:32:53 +0000
commit2964be56127076aeda912761a995120228230ca4 (patch)
tree71de8189c2fee264ce7c2662e6f48e48994ab8ff /python-docstring-to-markdown.spec
parentb311036d534aea41ce9a07f86bf1a27707433fca (diff)
automatic import of python-docstring-to-markdown
Diffstat (limited to 'python-docstring-to-markdown.spec')
-rw-r--r--python-docstring-to-markdown.spec210
1 files changed, 210 insertions, 0 deletions
diff --git a/python-docstring-to-markdown.spec b/python-docstring-to-markdown.spec
new file mode 100644
index 0000000..82743f6
--- /dev/null
+++ b/python-docstring-to-markdown.spec
@@ -0,0 +1,210 @@
+%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 <Python_Bot@openeuler.org> - 0.12-1
+- Package Spec generated