From 5cb0ad08a4f82a333ed9b8613e0f54effffd864bcbf1db87175cd1500e7d4799 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 8 Jan 2025 03:49:37 +0000 Subject: [PATCH] - Drop patch skip-pip-install.patch: * Create a pip links directory with a wheel of setuptools, since that is the only requirement for pip install with the current version of setuptools. - Remove unneeded Requires, limit them appropiately. - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argparse-manpage?expand=0&rev=34 --- .gitattributes | 23 +++++ .gitignore | 1 + python-argparse-manpage.changes | 169 ++++++++++++++++++++++++++++++++ python-argparse-manpage.spec | 85 ++++++++++++++++ skip-pip-install.patch | 13 +++ v4.6.tar.gz | 3 + 6 files changed, 294 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-argparse-manpage.changes create mode 100644 python-argparse-manpage.spec create mode 100644 skip-pip-install.patch create mode 100644 v4.6.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-argparse-manpage.changes b/python-argparse-manpage.changes new file mode 100644 index 0000000..a76d4f0 --- /dev/null +++ b/python-argparse-manpage.changes @@ -0,0 +1,169 @@ +------------------------------------------------------------------- +Wed Jan 8 03:47:56 UTC 2025 - Steve Kowalik + +- Drop patch skip-pip-install.patch: + * Create a pip links directory with a wheel of setuptools, since that + is the only requirement for pip install with the current version of + setuptools. +- Remove unneeded Requires, limit them appropiately. +- Switch to pyproject macros. + +------------------------------------------------------------------- +Wed Jun 12 09:22:52 UTC 2024 - Dirk Müller + +- update to 4.6: + * Fix build against Python 3.13 + +------------------------------------------------------------------- +Mon Oct 2 09:23:46 UTC 2023 - Dirk Müller + +- update to 4.5: + * We newly provide build_manpages.build_py and build_manpages.install + command classes that are re-usable from pyproject.toml. + No need to provide setup.py because of argparse-manpage. + * The prog= specifier (in setup.py/setup.cfg/pyproject.toml) is + now better handled so it doesn't conflict with + ArgumentParser(prog=..). + +------------------------------------------------------------------- +Thu Jun 15 09:42:01 UTC 2023 - Steve Kowalik + +- Update to 4.3: + * The pyproject.toml parsing feature now depends on tomli + * Support for pyproject.toml specification of manpages added. + * Support for pre-written man pages (the --manfile option) + * Incorrect dict access for --include support fixed. +- Add patch skip-pip-install.patch: + * Skip pip install tests for now. + +------------------------------------------------------------------- +Sun Apr 16 17:02:00 UTC 2023 - Dirk Müller + +- update to 4.1: + * A new `--include` feature, inspired by `help2man --include`. + * Allow overriding build date with SOURCE_DATE_EPOCH + environment variable in order to make builds reproducible. + +------------------------------------------------------------------- +Mon Nov 7 20:46:21 UTC 2022 - Yogalakshmi Arunachalam + +- Update to v4 + News in v4 + The manual page generator logic is now separated from the 'build_manpages' + module (which provides setup.py integration helpers). Therefore the + argparse-manpage doesn't necessarily have to depend on setuptools. + Projects that want to integrate using 'setup.py' should though place a new + "extra" named 'argparse-manpage[setuptools]' into their set of build + requirements in project.toml file. + + The old 'build_manpage' command (!= 'build_manpages') is now more + isolated from the rest of the code, likely never loaded. + + the Manpage class API was changed in v3 so it required an additional + constructor 'data' argument. This change was reverted, and the only + argument is again the ArgumentParser object. + + The 'version' and 'description' options were fixed. + + New options 'manual_section' and 'manual_title' were added. + + The manual page now automatically generates a current date in headers. + + Several groff escaping issues were fixed. + +------------------------------------------------------------------- +Thu Oct 20 09:13:17 UTC 2022 - Daniel Garcia + +- Remove not needed dep python-six + +------------------------------------------------------------------- +Thu Aug 4 11:18:38 UTC 2022 - Daniel Mach + +- 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 '), 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 + +------------------------------------------------------------------- +Tue Apr 20 12:44:31 UTC 2021 - Markéta Machová + +- Update to 1.5 + * fixed testsuite for Python 3.9 + * The "epilog" from argparse object is dumped to "COMMENTS" sections. + +------------------------------------------------------------------- +Thu Aug 20 15:43:19 UTC 2020 - Marketa Calabkova + +- Resubmit for SLE (jsc#SLE-12826) + +------------------------------------------------------------------- +Tue Apr 14 14:52:26 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + +------------------------------------------------------------------- +Fri Jan 31 17:44:02 UTC 2020 - Dominique Leuenberger + +- Require python-setuotools: /usr/bin/argparse-manpage does + from pkg_resources import load_entry_point. + +------------------------------------------------------------------- +Fri Jan 17 12:37:14 UTC 2020 - Marketa Calabkova + +- update to 1.3 + * drop additional .br tag from paragraphs so the multiline text is nicer + * provide argparse-manpage via entry_point + +------------------------------------------------------------------- +Fri Sep 13 12:41:43 UTC 2019 - Tomáš Chvátal + +- Update to 1.2.2: + * More complete release tarball, including tests. + * Fixed shebang in /bin/argparse-manpage script so it works on + Debian/Ubuntu as well as on Fedora. + * LICENSE file included in release tarball. + * Command-line executable now takes an optional '--output' argument. + +------------------------------------------------------------------- +Tue May 7 06:59:20 UTC 2019 - Tomáš Chvátal + +- Switch to github tarball + - Enable tests + - Get license file +- Run fdupes +- Add support for older distros than Tumbleweed + +------------------------------------------------------------------- +Fri Oct 12 14:29:54 UTC 2018 - Jan Engelhardt + +- Use noun phrase in summary. Repair grammar issues in description. + +------------------------------------------------------------------- +Thu Oct 11 15:04:42 UTC 2018 - Marcus Rueckert + +- initial package diff --git a/python-argparse-manpage.spec b/python-argparse-manpage.spec new file mode 100644 index 0000000..dd34c7c --- /dev/null +++ b/python-argparse-manpage.spec @@ -0,0 +1,85 @@ +# +# spec file for package python-argparse-manpage +# +# Copyright (c) 2025 SUSE LLC +# +# 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/ +# + + +%define mod_name argparse-manpage +Name: python-argparse-manpage +Version: 4.6 +Release: 0 +Summary: Tool for automatic manual page building from a Python ArgumentParser object +License: Apache-2.0 +URL: https://github.com/praiskup/argparse-manpage +Source: https://github.com/praiskup/argparse-manpage/archive/v%{version}.tar.gz +BuildArch: noarch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools-wheel} +BuildRequires: %{python_module setuptools} +BuildRequires: ca-certificates +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%if 0%{python_version_nodots} < 311 +Requires: python-tomli +%endif +Requires(post): update-alternatives +Requires(postun): update-alternatives +%python_subpackages + +%description +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. + +%prep +%autosetup -p1 -n %{mod_name}-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/argparse-manpage +%python_clone -a %{buildroot}%{_mandir}/man1/argparse-manpage.1 +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +mkdir wheels +cp $(ls -1 /usr/lib/python3.*/wheels/setuptools*whl | head -n 1) wheels +export PIP_NO_INDEX=1 +export PIP_FIND_LINKS=$(pwd)/wheels +%pytest + +%post +%{python_install_alternative argparse-manpage argparse-manpage.1} + +%postun +%python_uninstall_alternative argparse-manpage + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/argparse_manpage +%{python_sitelib}/build_manpages +%{python_sitelib}/argparse_manpage-%{version}.dist-info +%python_alternative %{_bindir}/argparse-manpage +%python_alternative %{_mandir}/man1/argparse-manpage.1%{?ext_man} + +%changelog diff --git a/skip-pip-install.patch b/skip-pip-install.patch new file mode 100644 index 0000000..9f58a76 --- /dev/null +++ b/skip-pip-install.patch @@ -0,0 +1,13 @@ +Index: argparse-manpage-4.3/tests/test_examples.py +=================================================================== +--- argparse-manpage-4.3.orig/tests/test_examples.py ++++ argparse-manpage-4.3/tests/test_examples.py +@@ -38,6 +38,8 @@ def _rmtree(directory): + raise + + def run_pip(args): ++ # Until we can figure out how to make pip behave ++ raise unittest.SkipTest() + environ = os.environ.copy() + environ['PYTHONPATH'] = ':'.join(sys.path) + from pip import __version__ diff --git a/v4.6.tar.gz b/v4.6.tar.gz new file mode 100644 index 0000000..7a421a1 --- /dev/null +++ b/v4.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d94701aadacc18dff778bf9c5c9eb2bd7ac296b0e302d3977943f46f613b8b8a +size 55498