From c7887ed10f7df2c8a8cd8e2cd4bcc60987298014 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 20 May 2016 15:39:24 +0300 Subject: [PATCH] update shebang also for py2 packages; update examples dir to be similar to py3 --- python.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python.spec b/python.spec index d588fa9..5106664 100644 --- a/python.spec +++ b/python.spec @@ -108,8 +108,10 @@ rm -rf $RPM_BUILD_ROOT # in case there are examples provided %if %{with python2} -install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} +cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} +find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \ + | xargs sed -i '1s|^#!.*python\b|#!%{__python}|' %endif %if %{with python3} install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} @@ -126,10 +128,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO %{py_sitescriptdir}/%{module} -%if "%{py_ver}" > "2.4" %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info -%endif -%{_examplesdir}/%{name}-%{version} +%{_examplesdir}/python-%{module}-%{version} %endif %if %{with python3} -- 2.44.0