#2 Package the executable in python3 package
Merged 6 years ago by ishcherb. Opened 6 years ago by ishcherb.
rpms/ ishcherb/python-gear master  into  master

file modified
+8 -2
@@ -3,7 +3,7 @@ 

  

  Name: python-%{srcname}

  Version: 0.11.0

- Release: 3%{?dist}

+ Release: 4%{?dist}

  Summary: Pure Python Async Gear Protocol Library

  

  Group: Applications/Productivity
@@ -72,6 +72,9 @@ 

  

  %install

  %py2_install

+ # Delete the Python 2 executable(s) so that the Python 3

+ # version(s) can take their place afterwards.

+ rm %{buildroot}%{_bindir}/*

  %py3_install

  

  
@@ -82,19 +85,22 @@ 

  %files -n python2-%{srcname}

  %doc README.rst CONTRIBUTING.rst doc

  %license LICENSE

- %{_bindir}/*

  %{python2_sitelib}/%{srcname}

  %{python2_sitelib}/%{srcname}-*egg-info

  

  %files -n python3-%{srcname}

  %doc README.rst CONTRIBUTING.rst doc

  %license LICENSE

+ %{_bindir}/*

  %{python3_sitelib}/%{srcname}

  %{python3_sitelib}/%{srcname}-*egg-info

  

  

  

  %changelog

+ * Fri Apr 6 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.11.0-4

+ - Package the executable in python3 package

+ 

  * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-3

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

  

Currently python2-gear depends on Python3:

dnf --disablerepo=* --enablerepo=rawhide repoquery --requires python2-gear
/usr/bin/python3
python(abi) = 2.7
python-daemon
python-extras
python-pbr

This happens because the Python 3 executable geard is packaged in python2-gear. According to Fedora packaging guidelines for Python, "If the executables provide the same functionality independent of whether they are run on top of Python 2 or Python 3, then only the Python 3 version of the executable should be packaged. " Therefore, I have moved the executable to python3-gear.

Also, given that the executable sometimes does not get overwritten in the %install section (see Note in the porting guide), I have added explicit removing of Py2 executable.

Thanks, it's looking good to me.

rebased onto 4259e22

6 years ago

Pull-Request has been merged by ishcherb

6 years ago