0a1
> %define pkgname %(echo %name | cut -d- -f2- | tr - _)
11a13
> BuildArch:     noarch
31c33
< CFLAGS="%{optflags}" %{__python3} setup.py build
---
> CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
34a37
> %{__python} -m installer --destdir=%{buildroot} dist/*.whl
36,42c39,44
< %{__python3} setup.py install \
<    --root="%{buildroot}" \
<    --install-headers=%{_includedir}/python \
<    --install-lib=%{python3_sitearch}
< 
< %clean
< [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
---
> #%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
46,48c48,51
< %dir %{python3_sitearch}/urwid
< %{python3_sitearch}/urwid/*
< %{python3_sitearch}/urwid-%{version}-py*.egg-info
---
> %dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
> %{python_sitelib}/%{pkgname}-%{version}.dist-info/*
> %dir %{python_sitelib}/%{pkgname}
> %{python_sitelib}/%{pkgname}/*
