2021-04-15 09:22:19 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-typer
|
|
|
|
#
|
2024-03-25 21:25:26 +00:00
|
|
|
# Copyright (c) 2024 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-04-07 15:06:09 +00:00
|
|
|
%define plainpython python
|
2024-03-25 21:25:26 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2021-04-15 09:22:19 +00:00
|
|
|
Name: python-typer
|
2024-12-04 21:10:53 +00:00
|
|
|
Version: 0.15.1
|
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
|
2024-04-07 15:06:09 +00:00
|
|
|
Source2: %{name}-rpmlintrc
|
2024-09-27 15:43:30 +00:00
|
|
|
BuildRequires: %{python_module pdm-backend}
|
2022-06-14 19:33:40 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2024-04-07 15:06:09 +00:00
|
|
|
BuildRequires: %{python_module typer-slim}
|
2021-04-15 09:22:19 +00:00
|
|
|
BuildRequires: fdupes
|
2021-07-23 19:01:09 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2024-04-07 15:06:09 +00:00
|
|
|
# Work around Python dependency not being auto-added as there are no modules provided
|
|
|
|
Requires: %{plainpython}(abi) = %{python_version}
|
|
|
|
Requires: python-click
|
|
|
|
Requires: python-rich
|
|
|
|
Requires: python-shellingham
|
|
|
|
Requires: python-typer-slim >= %version
|
|
|
|
Requires: python-typing_extensions
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2024-04-12 15:31:45 +00:00
|
|
|
# both packages provide /usr/bin/typer
|
|
|
|
Conflicts: erlang
|
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.
|
|
|
|
|
2024-04-07 15:06:09 +00:00
|
|
|
This package provides the Typer Python package and ensures all dependencies required
|
|
|
|
for full functionality are provided. In addition, it provides the command "typer"
|
|
|
|
which allows users to run scripts not using typer with the same command line comfort
|
|
|
|
as those that do.
|
2021-04-15 09:22:19 +00:00
|
|
|
|
|
|
|
%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
|
2024-04-07 15:06:09 +00:00
|
|
|
|
|
|
|
# Remove files that were already installed by typer-slim
|
|
|
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/typer
|
|
|
|
|
|
|
|
%python_clone -a %{buildroot}/%{_bindir}/typer
|
|
|
|
|
2021-04-15 09:22:19 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2024-04-07 15:06:09 +00:00
|
|
|
# There are no tests in the python package as it only pulls dependencies
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative typer
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative typer
|
2021-04-15 09:22:19 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2024-04-07 15:06:09 +00:00
|
|
|
%python_alternative %{_bindir}/typer
|
2023-05-08 19:13:01 +00:00
|
|
|
%{python_sitelib}/typer-%{version}*-info
|
2021-04-15 09:22:19 +00:00
|
|
|
|
|
|
|
%changelog
|