summaryrefslogtreecommitdiff
path: root/python-clize.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 05:17:07 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 05:17:07 +0000
commit6bf81c7da971443fe614756ef78b77960303ebd9 (patch)
tree4b16ea16fb44e63ab6e93f34f878921220ef9a86 /python-clize.spec
parent851ccef0e381f34db59088bf01060816384cde09 (diff)
automatic import of python-clize
Diffstat (limited to 'python-clize.spec')
-rw-r--r--python-clize.spec307
1 files changed, 307 insertions, 0 deletions
diff --git a/python-clize.spec b/python-clize.spec
new file mode 100644
index 0000000..8079f4b
--- /dev/null
+++ b/python-clize.spec
@@ -0,0 +1,307 @@
+%global _empty_manifest_terminate_build 0
+Name: python-clize
+Version: 5.0.0
+Release: 1
+Summary: Turn functions into command-line interfaces
+License: MIT
+URL: https://github.com/epsy/clize
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/31/6f/c0cbf1da986bfe562d205c7f7cabe5b8aaf856621d9fc3adcd3e675f0b7f/clize-5.0.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-sigtools
+Requires: python3-attrs
+Requires: python3-od
+Requires: python3-docutils
+Requires: python3-sphinx
+Requires: python3-sphinx-rtd-theme
+Requires: python3-dateutil
+Requires: python3-repeated-test
+Requires: python3-dateutil
+Requires: python3-Pygments
+
+%description
+*****
+Clize
+*****
+
+.. image:: https://readthedocs.org/projects/clize/badge/?version=stable
+ :target: http://clize.readthedocs.io/en/stable/?badge=stable
+ :alt: Documentation Status
+.. image:: https://badges.gitter.im/Join%20Chat.svg
+ :alt: Join the chat at https://gitter.im/epsy/clize
+ :target: https://gitter.im/epsy/clize?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
+.. image:: https://github.com/epsy/clize/actions/workflows/ci.yml/badge.svg?branch=master
+ :target: https://github.com/epsy/clize/actions/workflows/ci.yml
+.. image:: https://coveralls.io/repos/epsy/clize/badge.svg?branch=master
+ :target: https://coveralls.io/r/epsy/clize?branch=master
+
+Clize is an argument parser for `Python <https://www.python.org/>`_. You can
+use Clize as an alternative to ``argparse`` if you want an even easier way to
+create command-line interfaces.
+
+**With Clize, you can:**
+
+* Create command-line interfaces by creating functions and passing them to
+ `clize.run`.
+* Enjoy a CLI automatically created from your functions' parameters.
+* Bring your users familiar ``--help`` messages generated from your docstrings.
+* Reuse functionality across multiple commands using decorators.
+* Extend Clize with new parameter behavior.
+
+**Here's an example:**
+
+.. code-block:: python
+
+ from clize import run
+
+ def hello_world(name=None, *, no_capitalize=False):
+ """Greets the world or the given name.
+
+ :param name: If specified, only greet this person.
+ :param no_capitalize: Don't capitalize the given name.
+ """
+ if name:
+ if not no_capitalize:
+ name = name.title()
+ return 'Hello {0}!'.format(name)
+ return 'Hello world!'
+
+ if __name__ == '__main__':
+ run(hello_world)
+
+The python code above can now be used on the command-line as follows:
+
+.. code-block:: console
+
+ $ pip install clize
+ $ python3 hello.py --help
+ Usage: hello.py [OPTIONS] name
+
+ Greets the world or the given name.
+
+ Positional arguments:
+ name If specified, only greet this person.
+
+ Options:
+ --no-capitalize Don't capitalize the given name.
+
+ Other actions:
+ -h, --help Show the help
+ $ python3 hello.py
+ Hello world!
+ $ python3 hello.py john
+ Hello John!
+ $ python3 hello.py dave --no-capitalize
+ Hello dave!
+
+You can find the documentation and tutorials at http://clize.readthedocs.io/
+
+
+%package -n python3-clize
+Summary: Turn functions into command-line interfaces
+Provides: python-clize
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-clize
+*****
+Clize
+*****
+
+.. image:: https://readthedocs.org/projects/clize/badge/?version=stable
+ :target: http://clize.readthedocs.io/en/stable/?badge=stable
+ :alt: Documentation Status
+.. image:: https://badges.gitter.im/Join%20Chat.svg
+ :alt: Join the chat at https://gitter.im/epsy/clize
+ :target: https://gitter.im/epsy/clize?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
+.. image:: https://github.com/epsy/clize/actions/workflows/ci.yml/badge.svg?branch=master
+ :target: https://github.com/epsy/clize/actions/workflows/ci.yml
+.. image:: https://coveralls.io/repos/epsy/clize/badge.svg?branch=master
+ :target: https://coveralls.io/r/epsy/clize?branch=master
+
+Clize is an argument parser for `Python <https://www.python.org/>`_. You can
+use Clize as an alternative to ``argparse`` if you want an even easier way to
+create command-line interfaces.
+
+**With Clize, you can:**
+
+* Create command-line interfaces by creating functions and passing them to
+ `clize.run`.
+* Enjoy a CLI automatically created from your functions' parameters.
+* Bring your users familiar ``--help`` messages generated from your docstrings.
+* Reuse functionality across multiple commands using decorators.
+* Extend Clize with new parameter behavior.
+
+**Here's an example:**
+
+.. code-block:: python
+
+ from clize import run
+
+ def hello_world(name=None, *, no_capitalize=False):
+ """Greets the world or the given name.
+
+ :param name: If specified, only greet this person.
+ :param no_capitalize: Don't capitalize the given name.
+ """
+ if name:
+ if not no_capitalize:
+ name = name.title()
+ return 'Hello {0}!'.format(name)
+ return 'Hello world!'
+
+ if __name__ == '__main__':
+ run(hello_world)
+
+The python code above can now be used on the command-line as follows:
+
+.. code-block:: console
+
+ $ pip install clize
+ $ python3 hello.py --help
+ Usage: hello.py [OPTIONS] name
+
+ Greets the world or the given name.
+
+ Positional arguments:
+ name If specified, only greet this person.
+
+ Options:
+ --no-capitalize Don't capitalize the given name.
+
+ Other actions:
+ -h, --help Show the help
+ $ python3 hello.py
+ Hello world!
+ $ python3 hello.py john
+ Hello John!
+ $ python3 hello.py dave --no-capitalize
+ Hello dave!
+
+You can find the documentation and tutorials at http://clize.readthedocs.io/
+
+
+%package help
+Summary: Development documents and examples for clize
+Provides: python3-clize-doc
+%description help
+*****
+Clize
+*****
+
+.. image:: https://readthedocs.org/projects/clize/badge/?version=stable
+ :target: http://clize.readthedocs.io/en/stable/?badge=stable
+ :alt: Documentation Status
+.. image:: https://badges.gitter.im/Join%20Chat.svg
+ :alt: Join the chat at https://gitter.im/epsy/clize
+ :target: https://gitter.im/epsy/clize?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
+.. image:: https://github.com/epsy/clize/actions/workflows/ci.yml/badge.svg?branch=master
+ :target: https://github.com/epsy/clize/actions/workflows/ci.yml
+.. image:: https://coveralls.io/repos/epsy/clize/badge.svg?branch=master
+ :target: https://coveralls.io/r/epsy/clize?branch=master
+
+Clize is an argument parser for `Python <https://www.python.org/>`_. You can
+use Clize as an alternative to ``argparse`` if you want an even easier way to
+create command-line interfaces.
+
+**With Clize, you can:**
+
+* Create command-line interfaces by creating functions and passing them to
+ `clize.run`.
+* Enjoy a CLI automatically created from your functions' parameters.
+* Bring your users familiar ``--help`` messages generated from your docstrings.
+* Reuse functionality across multiple commands using decorators.
+* Extend Clize with new parameter behavior.
+
+**Here's an example:**
+
+.. code-block:: python
+
+ from clize import run
+
+ def hello_world(name=None, *, no_capitalize=False):
+ """Greets the world or the given name.
+
+ :param name: If specified, only greet this person.
+ :param no_capitalize: Don't capitalize the given name.
+ """
+ if name:
+ if not no_capitalize:
+ name = name.title()
+ return 'Hello {0}!'.format(name)
+ return 'Hello world!'
+
+ if __name__ == '__main__':
+ run(hello_world)
+
+The python code above can now be used on the command-line as follows:
+
+.. code-block:: console
+
+ $ pip install clize
+ $ python3 hello.py --help
+ Usage: hello.py [OPTIONS] name
+
+ Greets the world or the given name.
+
+ Positional arguments:
+ name If specified, only greet this person.
+
+ Options:
+ --no-capitalize Don't capitalize the given name.
+
+ Other actions:
+ -h, --help Show the help
+ $ python3 hello.py
+ Hello world!
+ $ python3 hello.py john
+ Hello John!
+ $ python3 hello.py dave --no-capitalize
+ Hello dave!
+
+You can find the documentation and tutorials at http://clize.readthedocs.io/
+
+
+%prep
+%autosetup -n clize-5.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-clize -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 5.0.0-1
+- Package Spec generated