15
0
forked from pool/python-fire
Files
python-fire/python-fire.spec

67 lines
1.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-fire
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
Name: python-fire
Version: 0.5.0
Release: 0
Summary: A library for automatically generating command line interfaces
License: Apache-2.0
URL: https://github.com/google/python-fire
Source: https://files.pythonhosted.org/packages/source/f/fire/fire-%{version}.tar.gz
# Based on https://github.com/google/python-fire/pull/265/files
Patch0: python-fire-no-mock.patch
Patch1: support-python-311.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six
Accepting request 719771 from home:pgajdos - version update to 0.2.0 * Help and usage screens * Help screens now have a man-page appearance and are shown with less-style pagination. Usage screens are shown when a user-error is encountered. The help and usage screens are considerably cleaner than the default output in previous versions of Fire. * Custom serialization * If you define a custom __str__ method on an object, that will be used to serialize the object when it is the final result of a Fire command. This means better support for numpy arrays, and better support for custom types. * Docstring parsing * Notably, docstrings are parsed in order to determine the descriptions to use for arguments in the help screens. We largely support (but not fully) Google, numpy, and RST style docstrings. These are the three most common styles of docstring used in Python code. * Access --help naturally * You no longer need to separate --help from your command with an extra --. Simply running command -h or command --help will give help, provided there isn't an argument named help in your component. * NamedTuples can be indexed both by their field names and by their indexes. * Callable objects can both be called, and their members can be accessed. * You must use flag syntax to call a callable object; you cannot pass their arguments positionally. * Single-hyphen flags are supported * You can now specify -flag instead of --flag if preferred. Both work. * Short-flags are permitted when their use is unambiguous * E.g. if your function has argument alpha, then you can specify its value with -a. * Fish completion support - deleted patches - fix-issue-164.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/719771 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=9
2019-07-30 08:13:31 +00:00
Requires: python-termcolor
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Levenshtein}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six}
Accepting request 719771 from home:pgajdos - version update to 0.2.0 * Help and usage screens * Help screens now have a man-page appearance and are shown with less-style pagination. Usage screens are shown when a user-error is encountered. The help and usage screens are considerably cleaner than the default output in previous versions of Fire. * Custom serialization * If you define a custom __str__ method on an object, that will be used to serialize the object when it is the final result of a Fire command. This means better support for numpy arrays, and better support for custom types. * Docstring parsing * Notably, docstrings are parsed in order to determine the descriptions to use for arguments in the help screens. We largely support (but not fully) Google, numpy, and RST style docstrings. These are the three most common styles of docstring used in Python code. * Access --help naturally * You no longer need to separate --help from your command with an extra --. Simply running command -h or command --help will give help, provided there isn't an argument named help in your component. * NamedTuples can be indexed both by their field names and by their indexes. * Callable objects can both be called, and their members can be accessed. * You must use flag syntax to call a callable object; you cannot pass their arguments positionally. * Single-hyphen flags are supported * You can now specify -flag instead of --flag if preferred. Both work. * Short-flags are permitted when their use is unambiguous * E.g. if your function has argument alpha, then you can specify its value with -a. * Fish completion support - deleted patches - fix-issue-164.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/719771 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=9
2019-07-30 08:13:31 +00:00
BuildRequires: %{python_module termcolor}
# /SECTION
%python_subpackages
%description
Python Fire is a library for automatically generating command line
interfaces (CLIs) from a Python object.
%prep
%autosetup -p1 -n fire-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
Accepting request 719771 from home:pgajdos - version update to 0.2.0 * Help and usage screens * Help screens now have a man-page appearance and are shown with less-style pagination. Usage screens are shown when a user-error is encountered. The help and usage screens are considerably cleaner than the default output in previous versions of Fire. * Custom serialization * If you define a custom __str__ method on an object, that will be used to serialize the object when it is the final result of a Fire command. This means better support for numpy arrays, and better support for custom types. * Docstring parsing * Notably, docstrings are parsed in order to determine the descriptions to use for arguments in the help screens. We largely support (but not fully) Google, numpy, and RST style docstrings. These are the three most common styles of docstring used in Python code. * Access --help naturally * You no longer need to separate --help from your command with an extra --. Simply running command -h or command --help will give help, provided there isn't an argument named help in your component. * NamedTuples can be indexed both by their field names and by their indexes. * Callable objects can both be called, and their members can be accessed. * You must use flag syntax to call a callable object; you cannot pass their arguments positionally. * Single-hyphen flags are supported * You can now specify -flag instead of --flag if preferred. Both work. * Short-flags are permitted when their use is unambiguous * E.g. if your function has argument alpha, then you can specify its value with -a. * Fish completion support - deleted patches - fix-issue-164.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/719771 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fire?expand=0&rev=9
2019-07-30 08:13:31 +00:00
%pytest
%files %{python_files}
%license LICENSE
%{python_sitelib}/*
%changelog