2021-04-15 09:22:19 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-typer
|
|
|
|
#
|
2023-01-05 15:16:32 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2021-04-15 09:22:19 +00:00
|
|
|
# Copyright (c) 2021 Matthias Bach <marix@marix.org>
|
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-07-23 19:01:09 +00:00
|
|
|
%define skip_python2 1
|
2021-04-15 09:22:19 +00:00
|
|
|
Name: python-typer
|
2022-11-06 19:55:11 +00:00
|
|
|
Version: 0.7.0
|
2021-04-15 09:22:19 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Typer, build great CLIs. Easy to code. Based on Python type hints
|
|
|
|
License: MIT
|
2021-07-23 19:01:09 +00:00
|
|
|
Group: Development/Languages/Python
|
2021-04-15 09:22:19 +00:00
|
|
|
URL: https://github.com/tiangolo/typer
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/typer/typer-%{version}.tar.gz
|
2022-06-24 19:16:04 +00:00
|
|
|
Patch0: run-subprocesses-with-correct-python.patch
|
|
|
|
Patch1: set-proper-pythonpath-for-tutorial-script-tests.patch
|
2021-04-15 09:22:19 +00:00
|
|
|
BuildRequires: %{python_module click}
|
|
|
|
BuildRequires: %{python_module coverage}
|
|
|
|
BuildRequires: %{python_module flit-core}
|
2022-06-14 19:33:40 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2021-04-15 09:22:19 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-07-18 10:32:29 +00:00
|
|
|
BuildRequires: %{python_module rich}
|
2021-07-23 19:01:09 +00:00
|
|
|
BuildRequires: %{python_module shellingham}
|
2022-07-18 10:32:29 +00:00
|
|
|
BuildRequires: %{python_module typing_extensions}
|
2021-04-15 09:22:19 +00:00
|
|
|
BuildRequires: fdupes
|
2021-07-23 19:01:09 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-04-15 09:22:19 +00:00
|
|
|
Requires: python-click >= 7.1
|
|
|
|
Recommends: python-colorama
|
2022-07-18 10:32:29 +00:00
|
|
|
Recommends: python-rich
|
2021-04-15 09:22:19 +00:00
|
|
|
Recommends: python-shellingham
|
2021-07-23 19:01:09 +00:00
|
|
|
BuildArch: noarch
|
2021-04-15 09:22:19 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Typer is a library for building CLI applications based on Python 3.6+ type hints.
|
|
|
|
|
|
|
|
Based on type hints, Typer enables great editor support and completion for developers.
|
|
|
|
With automatic help and completion, Typer makes CLIs easy to use for users.
|
|
|
|
|
|
|
|
This package provides the Typer Python package required to build and run Typer-based CLI applications.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n typer-%{version}
|
2022-06-24 19:16:04 +00:00
|
|
|
%autopatch -p1
|
2021-04-15 09:22:19 +00:00
|
|
|
|
|
|
|
%build
|
2022-06-14 19:33:40 +00:00
|
|
|
%pyproject_wheel
|
2021-04-15 09:22:19 +00:00
|
|
|
|
|
|
|
%install
|
2022-06-14 19:33:40 +00:00
|
|
|
%pyproject_install
|
2021-04-15 09:22:19 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
# the completion tests fail as build runs in sh which is not supported
|
|
|
|
%pytest -k 'not test_show_completion and not test_install_completion'
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|