]> git.pld-linux.org Git - packages/python-notify2.git/commitdiff
- fix examples shebangs and remove dead symlink
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 7 Mar 2021 22:54:31 +0000 (23:54 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 7 Mar 2021 22:54:31 +0000 (23:54 +0100)
python-notify2.spec

index daaace21a5bfd5f82815656b39bd418c5760147f..a0ce6a463c29b038bc30a2215a3aff2df1b7fe73 100644 (file)
@@ -4,8 +4,8 @@
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
-%define        module          notify2
-%define        egg_name        notify2
+%define                module          notify2
+%define                egg_name        notify2
 %define                pypi_name       notify2
 Summary:       Python 2 interface to DBus notifications
 Name:          python-%{pypi_name}
@@ -82,12 +82,18 @@ rm -rf $RPM_BUILD_ROOT
 %py_postclean
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
+%{__rm} $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}/notify2.py
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' \
+       $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}/*.py
 %endif
 
 %if %{with python3}
 %py3_install
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
+%{__rm} $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}/notify2.py
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python3}\1,' \
+       $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
 %endif
 
 %clean
This page took 0.078637 seconds and 4 git commands to generate.