]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
python-ext: unify examples
authorElan Ruusamäe <glen@delfi.ee>
Thu, 18 Aug 2016 11:43:15 +0000 (14:43 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 18 Aug 2016 11:43:22 +0000 (14:43 +0300)
python-ext.spec

index 558664ecd58b4ca728c9d393cd32ed96dfe746e8..0e845e20a609e222aa94804ca1eaffb244f2e1c8 100644 (file)
@@ -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}
This page took 0.112694 seconds and 4 git commands to generate.