2018-12-20 10:15:55 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-argparse-manpage
|
|
|
|
#
|
2020-01-17 12:50:43 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2018-12-20 10:15:55 +00: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.
|
|
|
|
|
2019-05-07 07:00:13 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-12-20 10:15:55 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-05-07 07:00:13 +00:00
|
|
|
%define mod_name argparse-manpage
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-12-20 10:15:55 +00:00
|
|
|
Name: python-argparse-manpage
|
2020-01-17 12:50:43 +00:00
|
|
|
Version: 1.3
|
2018-12-20 10:15:55 +00:00
|
|
|
Release: 0
|
2019-05-07 06:46:59 +00:00
|
|
|
Summary: Tool for automatic manual page building from a Python ArgumentParser object
|
2018-12-20 10:15:55 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2019-05-07 07:00:13 +00:00
|
|
|
URL: https://github.com/praiskup/argparse-manpage
|
|
|
|
Source: https://github.com/praiskup/argparse-manpage/archive/v%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module pytest}
|
2018-12-20 10:15:55 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-05-07 07:00:13 +00:00
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-01-31 23:05:32 +00:00
|
|
|
Requires: python-setuptools
|
2020-04-14 16:04:07 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2018-12-20 10:15:55 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-05-07 06:46:59 +00:00
|
|
|
This utility generates a manual page in an automatic way from an
|
|
|
|
ArgumentParser object, so the manpage 1:1 corresponds to the
|
|
|
|
automatically generated --help output. The manpage generator needs to
|
|
|
|
known the location of the object, user can specify that by (a) the
|
|
|
|
module name or corresponding python filename and (b) the object name
|
|
|
|
or the function name which returns the object. There's a limited
|
|
|
|
support for (deprecated) optparse objects, too.
|
2018-12-20 10:15:55 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{mod_name}-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-04-14 16:04:07 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/argparse-manpage
|
|
|
|
%python_clone -a %{buildroot}%{_mandir}/man1/argparse-manpage.1
|
2019-05-07 07:00:13 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%pytest
|
2018-12-20 10:15:55 +00:00
|
|
|
|
2020-04-14 16:04:07 +00:00
|
|
|
%post
|
|
|
|
%{python_install_alternative argparse-manpage argparse-manpage.1}
|
|
|
|
|
|
|
|
%postun
|
2020-04-14 17:12:44 +00:00
|
|
|
%python_uninstall_alternative argparse-manpage
|
2020-04-14 16:04:07 +00:00
|
|
|
|
2018-12-20 10:15:55 +00:00
|
|
|
%files %{python_files}
|
2019-05-07 07:00:13 +00:00
|
|
|
%doc README*
|
|
|
|
%license LICENSE
|
2018-12-20 10:15:55 +00:00
|
|
|
%{python_sitelib}/*
|
2020-04-14 16:04:07 +00:00
|
|
|
%python_alternative %{_bindir}/argparse-manpage
|
|
|
|
%python_alternative %{_mandir}/man1/argparse-manpage.1%{?ext_man}
|
2018-12-20 10:15:55 +00:00
|
|
|
|
|
|
|
%changelog
|