File project.diff of Package python-python-gflags

--- python-python-gflags.changes.orig
+++ python-python-gflags.changes
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Sat Apr 27 08:26:00 UTC 2019 - Scott Bahling <sbahling@suse.com>
+
+- install gflags2man using update-alternatives as to not conflict
+  with the python3 build. This is only required for building recent
+  versions of protobuf in openSUSE:Backports.
+
+-------------------------------------------------------------------
 Thu Feb 13 16:03:54 UTC 2014 - rschweikert@suse.com
 
 - include in SLE 12 (FATE #316167)
--- python-python-gflags.spec.orig
+++ python-python-gflags.spec
@@ -27,6 +27,8 @@ Source:         http://pypi.python.org/p
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 Provides:       python-gflags = %{version}
 # Change to < after 1.6 release
 Obsoletes:      python-gflags <= %{version}
@@ -59,13 +61,24 @@ python setup.py build
 
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-# Remove ext from name
-mv %{buildroot}%{_bindir}/gflags2man.py  %{buildroot}%{_bindir}/gflags2man
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+ln -s -f %{_sysconfdir}/alternatives/gflags2man %{buildroot}%{_bindir}/gflags2man
+
+%post
+update-alternatives --install \
+   %{_bindir}/vim vim %{_bindir}/gflags2man.py 15
+
+%postun
+if [ ! -f %{_bindir}/vim-normal ] ; then
+   update-alternatives --remove vim %{_bindir}/gflags2man.py
+fi
 
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS ChangeLog COPYING README
-%{_bindir}/gflags2man
 %{python_sitelib}/*
+%{_bindir}/gflags2man.py
+%{_bindir}/gflags2man
+%ghost %_sysconfdir/alternatives/gflags2man
 
 %changelog