templates/python: other updates/fixes to handle .egg-info in files list

This commit is contained in:
Silvan Calarco 2021-03-27 13:18:15 +01:00
parent 1d53d2994f
commit b182afc54c

View File

@ -1,3 +1,4 @@
%define pkgname %(echo %name | cut -d- -f2-)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
@ -12,8 +13,6 @@ License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: libpython-devel
Requires: python >= %python_version
%description
%{summary}.
@ -37,13 +36,13 @@ CFLAGS="%{optflags}" %{__python} setup.py build
\ --install-lib=%{python_sitearch} \\
\ --record=%{name}.filelist
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
sed -i "\\,\\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
%files %{?pyappend} -f %{name}.filelist
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{python_sitearch}/%{name}.py*
# %{python_sitearch}/%{name}.so
#%dir %{python_sitearch}/%{pkgname}-%{version}-py*.egg-info
#%{python_sitearch}/%{pkgname}-%{version}-py*.egg-info/*
@standard_docs@
## note: add extra documentation (if any)
# @standard_docs_devel@