#2 Only ship one /usr/bin/shade-inventory
Merged 9 months ago by jpena. Opened 9 months ago by churchyard.
rpms/ churchyard/python-shade usr_bin_once  into  master

file modified
+5 -17

@@ -18,7 +18,7 @@ 

  

  Name:           python-%{srcname}

  Version:        1.27.1

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Python module for operating OpenStack clouds

  License:        ASL 2.0

  URL:            https://pypi.python.org/pypi/shade

@@ -105,21 +105,9 @@ 

  

  %install

  %py2_install

- mv $RPM_BUILD_ROOT%{_bindir}/shade-inventory \

-         $RPM_BUILD_ROOT%{_bindir}/shade-inventory-%{python2_shortver}

  %if 0%{?with_python3}

+ rm $RPM_BUILD_ROOT%{_bindir}/*

  %py3_install

- mv $RPM_BUILD_ROOT%{_bindir}/shade-inventory \

-         $RPM_BUILD_ROOT%{_bindir}/shade-inventory-%{python3_shortver}

- %endif

- 

- # handle symlinking of unversioned binary

- %if 0%{?with_python3}

- ln -s shade-inventory-%{python3_shortver} \

-         $RPM_BUILD_ROOT%{_bindir}/shade-inventory

- %else

- ln -s shade-inventory-%{python2_shortver} \

-         $RPM_BUILD_ROOT%{_bindir}/shade-inventory

  %endif

  

  %files -n python2-%{srcname}

@@ -127,7 +115,6 @@ 

  %doc README.rst AUTHORS

  %{python2_sitelib}/shade*

  

- %{_bindir}/shade-inventory-%{python2_shortver}

  %if ! 0%{?with_python3}

  %{_bindir}/shade-inventory

  %endif

@@ -137,12 +124,13 @@ 

  %license LICENSE

  %doc README.rst AUTHORS

  %{python3_sitelib}/shade*

- 

- %{_bindir}/shade-inventory-%{python3_shortver}

  %{_bindir}/shade-inventory

  %endif

  

  %changelog

+ * Wed Sep 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.27.1-2

+ - Only ship one /usr/bin/shade-inventory

+ 

  * Thu Aug 16 2018 Javier Peña <jpena@redhat.com> - 1.27.1-1

  - New upstream 1.27.1 release

  - Fixed Rawhide build (bz#1605905)

https://fedoraproject.org/wiki/Packaging:Python_Appendix#Executables_in_.2Fusr.2Fbin

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, the
python2 version MUST NOT be packaged.

Pull-Request has been merged by jpena

9 months ago