[projects/template-specs] python-ext: unify examples
glen
glen at pld-linux.org
Thu Aug 18 13:43:35 CEST 2016
commit 733ed35097f993080cc3abaa440a8c58b5e9965c
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Aug 18 14:43:15 2016 +0300
python-ext: unify examples
python-ext.spec | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/python-ext.spec b/python-ext.spec
index 558664e..0e845e2 100644
--- a/python-ext.spec
+++ b/python-ext.spec
@@ -95,10 +95,11 @@ rm -rf $RPM_BUILD_ROOT
%py3_install
%endif
-# 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}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/733ed35097f993080cc3abaa440a8c58b5e9965c
More information about the pld-cvs-commit
mailing list