python-argparse-manpage/python-argparse-manpage.spec

56 lines
1.6 KiB
RPMSpec
Raw Permalink Normal View History

%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-argparse-manpage
Version: 4.6
Release: 1mamba
Summary: Build manual page from python's ArgumentParser object
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/praiskup/argparse-manpage
Source: https://pypi.debian.net/argparse-manpage/argparse-manpage-%{version}.tar.gz
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: libpython311-devel
## AUTOBUILDREQ-END
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q -n argparse-manpage-%{version}
%build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
#%if "%{?with_pyver}" != "3"
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%files %{?pyappend}
%defattr(-,root,root)
%{_bindir}/argparse-manpage
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitelib}/%{pkgname}
%{python_sitelib}/%{pkgname}/*
%dir %{python3_sitelib}/build_manpages
%{python3_sitelib}/build_manpages/*
%{_mandir}/man1/argparse-manpage.1*
%doc AUTHORS LICENSE
%changelog
* Sun Aug 04 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.6-1mamba
- package created using the webbuild interface