From b182afc54c8f2e0c63caf1c04714a179b24c933e Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 27 Mar 2021 13:18:15 +0100 Subject: [PATCH] templates/python: other updates/fixes to handle .egg-info in files list --- templates/python | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/python b/templates/python index 5aca918..700bff9 100644 --- a/templates/python +++ b/templates/python @@ -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@