python-yapf/python-yapf.spec

59 lines
1.6 KiB
RPMSpec

%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-yapf
Version: 0.32.0
Release: 2mamba
Summary: A formatter for Python code
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://pypi.org/project/yapf/
Source: http://pypi.debian.net/yapf/yapf-%{version}.tar.gz
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: libpython3-devel
## AUTOBUILDREQ-END
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q -n yapf-%{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}/{yapf,yapf-diff}; do
mv %{buildroot}${f}{,-%{?pyappend}}
done
%endif
%files %{?pyappend}
%defattr(-,root,root)
%{_bindir}/yapf*
%{_bindir}/yapf-diff*
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitelib}/%{pkgname}
%{python_sitelib}/%{pkgname}/*
%dir %{python_sitelib}/%{pkgname}tests
%{python_sitelib}/%{pkgname}tests/*
%doc AUTHORS LICENSE
%changelog
* Fri Apr 07 2023 Sdk Build System <sdk@mambasoft.it> 0.32.0-2mamba
- rebuilt with python 3.10
* Wed Nov 09 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.32.0-1mamba
- package created using the webbuild interface