]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - python-ext.spec
dokuwiki: cleanup tests
[projects/template-specs.git] / python-ext.spec
index 2683307b0f17700ec99d5b716255eada1ad177cf..0e845e20a609e222aa94804ca1eaffb244f2e1c8 100644 (file)
@@ -86,7 +86,6 @@ rm -rf _build/html/_sources
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %if %{with python2}
 %py_install
 %py_postclean
@@ -96,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}
@@ -118,9 +118,7 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py_sitedir}/%{module}
 %{py_sitedir}/%{module}/*.py[co]
 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
-%if "%{py_ver}" > "2.4"
 %{py_sitedir}/%{module}-%{version}-py*.egg-info
-%endif
 %{_examplesdir}/%{name}-%{version}
 %endif
 
This page took 0.042387 seconds and 4 git commands to generate.