From afc1b0f469238ce0991ae7bb5a025ceb4e12b2ea Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 15:08:55 +0000 Subject: automatic import of python-django-docopt-command --- python-django-docopt-command.spec | 301 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 python-django-docopt-command.spec (limited to 'python-django-docopt-command.spec') diff --git a/python-django-docopt-command.spec b/python-django-docopt-command.spec new file mode 100644 index 0000000..e811513 --- /dev/null +++ b/python-django-docopt-command.spec @@ -0,0 +1,301 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-docopt-command +Version: 1.1.0 +Release: 1 +Summary: Django-docopt-command allows you to write Django manage.py commands using the docopt library. +License: Apache License, Version 2.0 +URL: https://github.com/mbraak/django-docopt-command +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e1/6d/c51cb829d25ec2090cd3f286b5d6c9a95200fe277fa79be9d3c691acd2e9/django-docopt-command-1.1.0.tar.gz +BuildArch: noarch + +Requires: python3-docopt + +%description +# Django docopt command + +[![Build Status](https://img.shields.io/travis/mbraak/django-docopt-command.svg?style=for-the-badge)](https://travis-ci.org/mbraak/django-docopt-command) [![Version](https://img.shields.io/pypi/v/django-docopt-command.svg?colorB=brightgreen&style=for-the-badge)](https://pypi.python.org/pypi/django-docopt-command/) + +[![Coverage Status](https://img.shields.io/coveralls/mbraak/django-docopt-command.svg?style=for-the-badge)](https://coveralls.io/r/mbraak/django-docopt-command?branch=master) [![Requirements Status](https://img.shields.io/requires/github/mbraak/django-docopt-command.svg?style=for-the-badge)](https://requires.io/github/mbraak/django-docopt-command/requirements/?branch=master) + +[![License](https://img.shields.io/pypi/l/django-docopt-command.svg?style=for-the-badge&colorB=brightgreen)](https://pypi.python.org/pypi/django-docopt-command/) + +Django-docopt-command allows you to write [Django](https://www.djangoproject.com) [manage.py](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/) commands using the [docopt](http://www.docopt.org) library. This means that you can define commands using usage strings. + +References: + +* [Django](https://www.djangoproject.com): The Web framework for perfectionists with deadlines +* [The docopt library](http://www.docopt.org): Command-line interface description language +* [Writing custom django-admin commands](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/) + +```python +class Command(DocOptCommand): + # This usage string defines the command options: + docs = "Usage: command [--flag1]" + + def handle_docopt(self, arguments): + # arguments contains a dictionary with the options + pass +``` + +Django-docopt-command is tested with Django 2.2 - 3.1 and Python 3.5 - 3.8 and is hosted on [github](https://github.com/mbraak/django-docopt-command). + +Note that version 1.0.0 also supports Django 2.1 and version 0.5.0 supports Django 1.11 and Django 2.0. + +### Example + +See the *testproject/docopt_example* in the django-docopt-command github repository. + +## Usage + +Install django-docopt-command. + +``` +pip install django-docopt-command +``` + +**Step 1 - management command** + +Write a Django custom management command, as described in [Writing custom django-admin commands](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/). + +**Step 2 - inherit from DocOptCommand** + +```python +class Command(DocOptCommand): + pass +``` + +**Step 3 - add a docs string** + +```python +class Command(DocOptCommand): + docs = "Usage: command [--flag1]" +``` + +**Step 4 - override handle_docopt** + +```python +class Command(DocOptCommand): + docs = "Usage: command [--flag1]" + + def handle_docopt(self, arguments): + option1 = arguments['option1'] + option2 = arguments['option2'] +``` + +## License + +Django-docopt-command is licensed under the Apache 2.0 License. + + + + +%package -n python3-django-docopt-command +Summary: Django-docopt-command allows you to write Django manage.py commands using the docopt library. +Provides: python-django-docopt-command +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-docopt-command +# Django docopt command + +[![Build Status](https://img.shields.io/travis/mbraak/django-docopt-command.svg?style=for-the-badge)](https://travis-ci.org/mbraak/django-docopt-command) [![Version](https://img.shields.io/pypi/v/django-docopt-command.svg?colorB=brightgreen&style=for-the-badge)](https://pypi.python.org/pypi/django-docopt-command/) + +[![Coverage Status](https://img.shields.io/coveralls/mbraak/django-docopt-command.svg?style=for-the-badge)](https://coveralls.io/r/mbraak/django-docopt-command?branch=master) [![Requirements Status](https://img.shields.io/requires/github/mbraak/django-docopt-command.svg?style=for-the-badge)](https://requires.io/github/mbraak/django-docopt-command/requirements/?branch=master) + +[![License](https://img.shields.io/pypi/l/django-docopt-command.svg?style=for-the-badge&colorB=brightgreen)](https://pypi.python.org/pypi/django-docopt-command/) + +Django-docopt-command allows you to write [Django](https://www.djangoproject.com) [manage.py](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/) commands using the [docopt](http://www.docopt.org) library. This means that you can define commands using usage strings. + +References: + +* [Django](https://www.djangoproject.com): The Web framework for perfectionists with deadlines +* [The docopt library](http://www.docopt.org): Command-line interface description language +* [Writing custom django-admin commands](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/) + +```python +class Command(DocOptCommand): + # This usage string defines the command options: + docs = "Usage: command [--flag1]" + + def handle_docopt(self, arguments): + # arguments contains a dictionary with the options + pass +``` + +Django-docopt-command is tested with Django 2.2 - 3.1 and Python 3.5 - 3.8 and is hosted on [github](https://github.com/mbraak/django-docopt-command). + +Note that version 1.0.0 also supports Django 2.1 and version 0.5.0 supports Django 1.11 and Django 2.0. + +### Example + +See the *testproject/docopt_example* in the django-docopt-command github repository. + +## Usage + +Install django-docopt-command. + +``` +pip install django-docopt-command +``` + +**Step 1 - management command** + +Write a Django custom management command, as described in [Writing custom django-admin commands](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/). + +**Step 2 - inherit from DocOptCommand** + +```python +class Command(DocOptCommand): + pass +``` + +**Step 3 - add a docs string** + +```python +class Command(DocOptCommand): + docs = "Usage: command [--flag1]" +``` + +**Step 4 - override handle_docopt** + +```python +class Command(DocOptCommand): + docs = "Usage: command [--flag1]" + + def handle_docopt(self, arguments): + option1 = arguments['option1'] + option2 = arguments['option2'] +``` + +## License + +Django-docopt-command is licensed under the Apache 2.0 License. + + + + +%package help +Summary: Development documents and examples for django-docopt-command +Provides: python3-django-docopt-command-doc +%description help +# Django docopt command + +[![Build Status](https://img.shields.io/travis/mbraak/django-docopt-command.svg?style=for-the-badge)](https://travis-ci.org/mbraak/django-docopt-command) [![Version](https://img.shields.io/pypi/v/django-docopt-command.svg?colorB=brightgreen&style=for-the-badge)](https://pypi.python.org/pypi/django-docopt-command/) + +[![Coverage Status](https://img.shields.io/coveralls/mbraak/django-docopt-command.svg?style=for-the-badge)](https://coveralls.io/r/mbraak/django-docopt-command?branch=master) [![Requirements Status](https://img.shields.io/requires/github/mbraak/django-docopt-command.svg?style=for-the-badge)](https://requires.io/github/mbraak/django-docopt-command/requirements/?branch=master) + +[![License](https://img.shields.io/pypi/l/django-docopt-command.svg?style=for-the-badge&colorB=brightgreen)](https://pypi.python.org/pypi/django-docopt-command/) + +Django-docopt-command allows you to write [Django](https://www.djangoproject.com) [manage.py](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/) commands using the [docopt](http://www.docopt.org) library. This means that you can define commands using usage strings. + +References: + +* [Django](https://www.djangoproject.com): The Web framework for perfectionists with deadlines +* [The docopt library](http://www.docopt.org): Command-line interface description language +* [Writing custom django-admin commands](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/) + +```python +class Command(DocOptCommand): + # This usage string defines the command options: + docs = "Usage: command [--flag1]" + + def handle_docopt(self, arguments): + # arguments contains a dictionary with the options + pass +``` + +Django-docopt-command is tested with Django 2.2 - 3.1 and Python 3.5 - 3.8 and is hosted on [github](https://github.com/mbraak/django-docopt-command). + +Note that version 1.0.0 also supports Django 2.1 and version 0.5.0 supports Django 1.11 and Django 2.0. + +### Example + +See the *testproject/docopt_example* in the django-docopt-command github repository. + +## Usage + +Install django-docopt-command. + +``` +pip install django-docopt-command +``` + +**Step 1 - management command** + +Write a Django custom management command, as described in [Writing custom django-admin commands](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/). + +**Step 2 - inherit from DocOptCommand** + +```python +class Command(DocOptCommand): + pass +``` + +**Step 3 - add a docs string** + +```python +class Command(DocOptCommand): + docs = "Usage: command [--flag1]" +``` + +**Step 4 - override handle_docopt** + +```python +class Command(DocOptCommand): + docs = "Usage: command [--flag1]" + + def handle_docopt(self, arguments): + option1 = arguments['option1'] + option2 = arguments['option2'] +``` + +## License + +Django-docopt-command is licensed under the Apache 2.0 License. + + + + +%prep +%autosetup -n django-docopt-command-1.1.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-django-docopt-command -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 1.1.0-1 +- Package Spec generated -- cgit v1.2.3