2018-12-20 11:15:55 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-argparse-manpage
|
|
|
|
#
|
2024-06-12 11:23:03 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-12-20 11:15:55 +01: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 09:00:13 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-12-20 11:15:55 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-05-07 09:00:13 +02:00
|
|
|
%define mod_name argparse-manpage
|
2018-12-20 11:15:55 +01:00
|
|
|
Name: python-argparse-manpage
|
2024-06-12 11:23:03 +02:00
|
|
|
Version: 4.6
|
2018-12-20 11:15:55 +01:00
|
|
|
Release: 0
|
2019-05-07 08:46:59 +02:00
|
|
|
Summary: Tool for automatic manual page building from a Python ArgumentParser object
|
2018-12-20 11:15:55 +01:00
|
|
|
License: Apache-2.0
|
2019-05-07 09:00:13 +02:00
|
|
|
URL: https://github.com/praiskup/argparse-manpage
|
|
|
|
Source: https://github.com/praiskup/argparse-manpage/archive/v%{version}.tar.gz
|
2023-06-15 11:43:05 +02:00
|
|
|
# PATCH-FIX-OPENSUSE Skip pip install tests until pip can behave better
|
|
|
|
Patch0: skip-pip-install.patch
|
Accepting request 992761 from home:dmach:branches:openSUSE:Factory
- Update to 3
* New man page format: single-commands-section
* Add CLI and conf options for setting the output format
* Add CLI and conf options to explicitly specify %prog value
* Skip showing commands with help == SUPPRESS
* Avoid rendering docs for command aliases
* Print program name in upper case in header and footer
* The --author CLI option has changed, and takes arbitrary string
(typically 'Author Name <the@example.com>'), and newly can be specified
multiple times. Therefore, it now replaces the '--author-email' option.
The --author-email option is kept, but is just an alias to the --author
option.
* All CLI options can be specified also in setup.cfg
* Don't render AUTHORS and DISTRIBUTION if they would contain undefined values
* Remove '... was written by' from AUTHORS
* Fixed the testsuite against the setuptools v60+
* Output manual pages should be built reproducibly, no matter the current
size of the terminal.
* Methods build_manpages, get_build_py_cmd, get_install_cmd are now
provided in top-level module.
* More portable opening and parsing given by python file name.
* Split out options by generic argument groups, not only predefined
"positional arguments", "options", and Subparsers.
* Drop python3-six requirement.
* Properly highligh all option argument METAVARs.
- spec changes:
* BuildArch set to noarch
* Add build dependency on pip module
OBS-URL: https://build.opensuse.org/request/show/992761
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argparse-manpage?expand=0&rev=20
2022-08-04 22:58:04 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: %{python_module pip}
|
2019-05-07 09:00:13 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-12-20 11:15:55 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-06-15 11:43:05 +02:00
|
|
|
BuildRequires: ca-certificates
|
2019-05-07 09:00:13 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-02-01 00:05:32 +01:00
|
|
|
Requires: python-setuptools
|
2023-06-15 11:43:05 +02:00
|
|
|
Requires: python-tomli
|
2021-04-22 00:32:02 +02:00
|
|
|
Requires(post): update-alternatives
|
2024-06-12 11:23:03 +02:00
|
|
|
Requires(postun): update-alternatives
|
2018-12-20 11:15:55 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-05-07 08:46:59 +02: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 11:15:55 +01:00
|
|
|
|
|
|
|
%prep
|
2023-06-15 11:43:05 +02:00
|
|
|
%autosetup -p1 -n %{mod_name}-%{version}
|
2018-12-20 11:15:55 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-04-14 18:04:07 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/argparse-manpage
|
|
|
|
%python_clone -a %{buildroot}%{_mandir}/man1/argparse-manpage.1
|
2019-05-07 09:00:13 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%pytest
|
2018-12-20 11:15:55 +01:00
|
|
|
|
2020-04-14 18:04:07 +02:00
|
|
|
%post
|
|
|
|
%{python_install_alternative argparse-manpage argparse-manpage.1}
|
|
|
|
|
|
|
|
%postun
|
2020-04-14 19:12:44 +02:00
|
|
|
%python_uninstall_alternative argparse-manpage
|
2020-04-14 18:04:07 +02:00
|
|
|
|
2018-12-20 11:15:55 +01:00
|
|
|
%files %{python_files}
|
2019-05-07 09:00:13 +02:00
|
|
|
%doc README*
|
|
|
|
%license LICENSE
|
2023-06-15 11:43:05 +02:00
|
|
|
%{python_sitelib}/argparse_manpage
|
|
|
|
%{python_sitelib}/build_manpages
|
|
|
|
%{python_sitelib}/argparse_manpage-%{version}*info
|
2020-04-14 18:04:07 +02:00
|
|
|
%python_alternative %{_bindir}/argparse-manpage
|
|
|
|
%python_alternative %{_mandir}/man1/argparse-manpage.1%{?ext_man}
|
2018-12-20 11:15:55 +01:00
|
|
|
|
|
|
|
%changelog
|