diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-docstring-to-markdown.spec | 210 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 212 insertions, 0 deletions
@@ -0,0 +1 @@ +/docstring-to-markdown-0.12.tar.gz 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 + +[](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22) + +[](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 + +[](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22) + +[](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 + +[](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22) + +[](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 @@ -0,0 +1 @@ +ebc59714af575eb5ad6197df7fb183f9 docstring-to-markdown-0.12.tar.gz |
