2018-02-20 16:50:31 +00:00
|
|
|
%if 0%{?fedora}
|
2021-11-28 22:24:49 +00:00
|
|
|
%bcond_without pyproject
|
|
|
|
%bcond_with python2
|
|
|
|
%bcond_with python3
|
2018-02-20 16:50:31 +00:00
|
|
|
%else
|
2021-11-28 22:24:49 +00:00
|
|
|
%bcond_with pyproject
|
2018-02-20 16:50:31 +00:00
|
|
|
%if 0%{?rhel} > 7
|
|
|
|
%bcond_with python2
|
|
|
|
%bcond_without python3
|
|
|
|
%else
|
|
|
|
%bcond_without python2
|
|
|
|
%bcond_with python3
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%bcond_without check
|
|
|
|
|
|
|
|
|
|
|
|
%global sum() Build manual page from %* ArgumentParser object
|
|
|
|
%global desc \
|
|
|
|
Generate manual page an automatic way from 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 is a limited support for (deprecated) optparse objects, too.
|
|
|
|
|
|
|
|
|
|
|
|
Name: argparse-manpage
|
2022-04-27 07:29:08 +00:00
|
|
|
Version: 3
|
2022-07-19 20:11:26 +00:00
|
|
|
Release: 4%{?dist}
|
2018-02-20 16:50:31 +00:00
|
|
|
Summary: %{sum Python}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
License: ASL 2.0
|
|
|
|
URL: https://github.com/praiskup/%{name}
|
2021-11-28 22:24:49 +00:00
|
|
|
Source0: https://github.com/praiskup/%name/releases/download/v%version/%name-%version.tar.gz
|
2018-02-20 16:50:31 +00:00
|
|
|
|
2022-07-19 20:11:26 +00:00
|
|
|
# Fix tests compatibility with pip >= 21.3
|
|
|
|
# Fixed upstream: https://github.com/praiskup/argparse-manpage/pull/60
|
|
|
|
Patch1: fix-pip-21.3-compat.patch
|
|
|
|
|
2018-02-20 16:50:31 +00:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python2-setuptools python2-devel
|
|
|
|
%if %{with check}
|
|
|
|
%if 0%{?rhel} && 0%{?rhel} == 7
|
2021-11-28 22:24:49 +00:00
|
|
|
BuildRequires: pytest
|
2018-02-20 16:50:31 +00:00
|
|
|
%else
|
2021-11-28 22:24:49 +00:00
|
|
|
BuildRequires: python2-pytest
|
2018-02-20 16:50:31 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%endif
|
2021-11-28 22:24:49 +00:00
|
|
|
|
2018-02-20 16:50:31 +00:00
|
|
|
%if %{with python3}
|
|
|
|
BuildRequires: python3-setuptools python3-devel
|
|
|
|
%if %{with check}
|
2021-11-28 22:24:49 +00:00
|
|
|
BuildRequires: python3-pytest
|
2018-02-20 16:50:31 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
2021-11-28 22:24:49 +00:00
|
|
|
|
|
|
|
%if %{with pyproject}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
%if %{with check}
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with python3} || %{with pyproject}
|
2018-02-20 16:50:31 +00:00
|
|
|
Requires: python3-%name = %version-%release
|
|
|
|
%else
|
|
|
|
Requires: python2-%name = %version-%release
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
%desc
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python2-%name
|
|
|
|
Summary: %{sum Python 2}
|
|
|
|
|
|
|
|
%description -n python2-%name
|
|
|
|
%{desc}
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-%name
|
|
|
|
Summary: %{sum Python 3}
|
|
|
|
|
|
|
|
%description -n python3-%name
|
|
|
|
%{desc}
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2022-07-19 20:11:26 +00:00
|
|
|
%patch1 -p1
|
2018-02-20 16:50:31 +00:00
|
|
|
|
2021-11-28 22:24:49 +00:00
|
|
|
%if %{with pyproject}
|
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires
|
|
|
|
%endif
|
|
|
|
|
2018-02-20 16:50:31 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%if %{with python2}
|
|
|
|
%py2_build
|
|
|
|
%endif
|
|
|
|
%if %{with python3}
|
|
|
|
%py3_build
|
|
|
|
%endif
|
2021-11-28 22:24:49 +00:00
|
|
|
%if %{with pyproject}
|
|
|
|
%pyproject_wheel
|
|
|
|
%endif
|
2018-02-20 16:50:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%if %{with python2}
|
|
|
|
%py2_install
|
|
|
|
%endif
|
|
|
|
%if %{with python3}
|
|
|
|
%py3_install
|
|
|
|
%endif
|
2021-11-28 22:24:49 +00:00
|
|
|
%if %{with pyproject}
|
|
|
|
%pyproject_install
|
|
|
|
%endif
|
2018-02-20 16:50:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
%check
|
|
|
|
%if %{with python2}
|
2021-11-28 22:24:49 +00:00
|
|
|
PYTHONPATH=%buildroot%python2_sitearch %__python2 -m pytest -vv
|
2018-02-20 16:50:31 +00:00
|
|
|
%endif
|
|
|
|
%if %{with python3}
|
2021-11-28 22:24:49 +00:00
|
|
|
PYTHONPATH=%buildroot%python3_sitearch %__python3 -m pytest -vv
|
|
|
|
%endif
|
|
|
|
%if %{with pyproject}
|
|
|
|
%pytest
|
2018-02-20 16:50:31 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/argparse-manpage
|
|
|
|
%_mandir/man1/argparse-manpage.1.*
|
2021-11-28 22:24:49 +00:00
|
|
|
%if %{with python3} || %{with pyproject}
|
2022-04-27 07:29:08 +00:00
|
|
|
%python3_sitelib/build_manpages/cli.py
|
2018-02-20 16:50:31 +00:00
|
|
|
%else
|
2022-04-27 07:29:08 +00:00
|
|
|
%python2_sitelib/build_manpages/cli.py
|
2018-02-20 16:50:31 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
%files -n python2-%name
|
|
|
|
%license LICENSE
|
|
|
|
%python2_sitelib/build_manpages
|
|
|
|
%python2_sitelib/argparse_manpage-%{version}*.egg-info
|
2022-04-27 07:29:08 +00:00
|
|
|
%exclude %python2_sitelib/build_manpages/cli.py
|
2018-02-20 16:50:31 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2021-11-28 22:24:49 +00:00
|
|
|
%if %{with python3} || %{with pyproject}
|
2018-02-20 16:50:31 +00:00
|
|
|
%files -n python3-%name
|
|
|
|
%license LICENSE
|
|
|
|
%python3_sitelib/build_manpages
|
2021-11-28 22:24:49 +00:00
|
|
|
%if %{with pyproject}
|
|
|
|
%python3_sitelib/argparse_manpage-*dist-info
|
|
|
|
%else
|
2018-02-20 16:50:31 +00:00
|
|
|
%python3_sitelib/argparse_manpage-%{version}*.egg-info
|
2021-11-28 22:24:49 +00:00
|
|
|
%endif
|
2022-04-27 07:29:08 +00:00
|
|
|
%exclude %python3_sitelib/build_manpages/cli.py
|
2018-02-20 16:50:31 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-07-19 20:11:26 +00:00
|
|
|
* Fri Jul 22 2022 Charalampos Stratakis <cstratak@redhat.com> - 3-4
|
|
|
|
- Fix tests compatibility with pip >= 21.3
|
|
|
|
|
2022-07-20 21:10:40 +00:00
|
|
|
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
2022-06-13 15:08:08 +00:00
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3-2
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
2022-04-27 07:29:08 +00:00
|
|
|
* Wed Apr 27 2022 Pavel Raiskup <praiskup@redhat.com> - 3-1
|
|
|
|
- new upstream release: https://github.com/praiskup/argparse-manpage/releases/tag/v3
|
|
|
|
|
2022-03-03 14:59:07 +00:00
|
|
|
* Thu Mar 03 2022 Pavel Raiskup <praiskup@redhat.com> - 2.2-1
|
|
|
|
- new release - fix build for the setuptools v60+
|
|
|
|
|
2022-01-19 21:34:55 +00:00
|
|
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
2022-01-12 01:52:28 +00:00
|
|
|
* Wed Jan 12 2022 Pavel Raiskup <praiskup@redhat.com> - 2.1-1
|
|
|
|
- new upstream release:
|
|
|
|
https://github.com/praiskup/argparse-manpage/releases/tag/v2.1
|
|
|
|
|
2021-11-28 22:24:49 +00:00
|
|
|
* Sun Nov 28 2021 Pavel Raiskup <praiskup@redhat.com> - 2-1
|
|
|
|
- new upstream release:
|
|
|
|
https://github.com/praiskup/argparse-manpage/releases/tag/v2
|
|
|
|
|
2021-07-21 17:52:45 +00:00
|
|
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
2021-06-04 17:59:31 +00:00
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.5-3
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
2021-01-26 00:24:22 +00:00
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-12-14 07:07:50 +00:00
|
|
|
* Mon Dec 14 2020 Pavel Raiskup <praiskup@redhat.com> - 1.5-1
|
|
|
|
- new release
|
|
|
|
|
2020-07-27 12:21:45 +00:00
|
|
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-05-26 00:40:45 +00:00
|
|
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4-3
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
2020-01-28 11:58:57 +00:00
|
|
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2020-01-24 18:22:17 +00:00
|
|
|
* Fri Jan 24 2020 Pavel Raiskup <praiskup@redhat.com> - 1.4-1
|
|
|
|
- new release to fix testsuite against Python 3.9
|
|
|
|
|
2020-01-07 07:04:12 +00:00
|
|
|
* Tue Jan 07 2020 Pavel Raiskup <praiskup@redhat.com> - 1.3-1
|
|
|
|
- new release
|
|
|
|
|
2019-09-07 13:32:28 +00:00
|
|
|
* Sat Sep 07 2019 Pavel Raiskup <praiskup@redhat.com> - 1.2.2-1
|
|
|
|
- new release
|
|
|
|
|
2019-08-19 08:01:19 +00:00
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1-6
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
2019-07-24 18:20:29 +00:00
|
|
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-01-31 13:43:08 +00:00
|
|
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-10-02 13:30:39 +00:00
|
|
|
* Tue Oct 02 2018 Pavel Raiskup <praiskup@redhat.com> - 1.1-3
|
|
|
|
- drop python3 on F30+ (rhbz#1634992)
|
|
|
|
|
2018-07-12 20:29:22 +00:00
|
|
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
2018-06-25 20:24:17 +00:00
|
|
|
* Mon Jun 25 2018 Pavel Raiskup <praiskup@redhat.com> - 1.1-1
|
|
|
|
- v1.1
|
|
|
|
|
2018-06-19 08:39:42 +00:00
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-2
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
2018-02-20 16:50:31 +00:00
|
|
|
* Mon Feb 19 2018 Pavel Raiskup <praiskup@redhat.com> - 1.0.0-1
|
|
|
|
- initial RPM packaging
|