2022-07-13 20:42:08 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-autocommand
|
|
|
|
#
|
2023-01-02 19:40:52 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2022-07-13 20:42:08 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-04-21 16:54:02 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2022-07-13 20:42:08 +02:00
|
|
|
Name: python-autocommand
|
2023-01-02 19:40:52 +01:00
|
|
|
Version: 2.2.2
|
2022-07-13 20:42:08 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A library to create a command-line program from a function
|
2023-01-02 19:40:52 +01:00
|
|
|
License: LGPL-3.0-only
|
2022-07-13 20:42:08 +02:00
|
|
|
URL: https://github.com/Lucretiel/autocommand
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/a/autocommand/autocommand-%{version}.tar.gz
|
2023-12-22 15:20:12 +01:00
|
|
|
# PATCH-FIX-UPSTREAM setuptools-dynamic-license.patch gh#Lucretiel/autocommand#31
|
|
|
|
Patch0: setuptools-dynamic-license.patch
|
2023-01-02 19:40:52 +01:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2023-12-22 15:20:12 +01:00
|
|
|
BuildRequires: %{python_module pip}
|
2022-07-13 20:42:08 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2023-01-02 19:40:52 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-12-22 15:20:12 +01:00
|
|
|
BuildRequires: %{python_module wheel}
|
2022-07-13 20:42:08 +02:00
|
|
|
BuildRequires: fdupes
|
2023-01-02 19:40:52 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-07-13 20:42:08 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Autocommand turns a function into a command-line program. It converts the function's parameter
|
|
|
|
signature into command-line arguments, and automatically runs the function if the module was
|
|
|
|
called as __main__. In effect, it lets your create a smart main function.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n autocommand-%{version}
|
|
|
|
|
|
|
|
%build
|
2023-12-22 15:20:12 +01:00
|
|
|
%pyproject_wheel
|
2022-07-13 20:42:08 +02:00
|
|
|
|
|
|
|
%install
|
2023-12-22 15:20:12 +01:00
|
|
|
%pyproject_install
|
2022-07-13 20:42:08 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%pytest
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
2023-01-02 19:40:52 +01:00
|
|
|
%doc README.md
|
2022-07-13 20:42:08 +02:00
|
|
|
%{python_sitelib}/autocommand
|
2023-12-22 15:20:12 +01:00
|
|
|
%{python_sitelib}/autocommand-%{version}.dist-info
|
2022-07-13 20:42:08 +02:00
|
|
|
|
|
|
|
%changelog
|