#1 Only ship one /usr/bin/openstack
Merged 5 months ago by jpena. Opened 6 months ago by churchyard.
rpms/ churchyard/python-openstackclient usr_bin_one  into  master

file modified
+12 -11

@@ -10,7 +10,7 @@ 

  

  Name:             python-openstackclient

  Version:          3.14.1

- Release:          4%{?dist}

+ Release:          5%{?dist}

  Summary:          OpenStack Command-line Client

  

  License:          ASL 2.0

@@ -178,15 +178,13 @@ 

  %endif

  

  %install

+ %{__python2} setup.py install -O1 --skip-build --root %{buildroot}

+ 

  %if 0%{?with_python3}

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

  %py3_install

- mv %{buildroot}%{_bindir}/openstack %{buildroot}%{_bindir}/openstack-%{python3_version}

- ln -s ./openstack-%{python3_version} %{buildroot}%{_bindir}/openstack-3

  %endif

  

- %{__python2} setup.py install -O1 --skip-build --root %{buildroot}

- ln -s ./openstack %{buildroot}%{_bindir}/openstack-2

- ln -s ./openstack %{buildroot}%{_bindir}/openstack-%{python2_version}

  

  sphinx-build -b html doc/source doc/build/html

  sphinx-build -b man doc/source doc/build/man

@@ -220,12 +218,12 @@ 

  %files -n python2-%{client}

  %license LICENSE

  %doc README.rst

- %{_bindir}/openstack

- %{_bindir}/openstack-2

- %{_bindir}/openstack-%{python2_version}

  %{python2_sitelib}/openstackclient

  %{python2_sitelib}/*.egg-info

+ %if ! 0%{?with_python3}

+ %{_bindir}/openstack

  %{_mandir}/man1/openstack.1*

+ %endif

  

  %files -n python-%{client}-doc

  %license LICENSE

@@ -238,13 +236,16 @@ 

  %files -n python3-%{client}

  %license LICENSE

  %doc README.rst

- %{_bindir}/openstack-3

- %{_bindir}/openstack-%{python3_version}

+ %{_bindir}/openstack

+ %{_mandir}/man1/openstack.1*

  %{python3_sitelib}/openstackclient

  %{python3_sitelib}/*.egg-info

  %endif

  

  %changelog

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

+ - Only ship one /usr/bin/openstack

+ 

  * Mon Aug 13 2018 Javier Peña <jpena@redhat.com> - 3.14.1-4

  - Fix build for Rawhide (bz#1605807)

  

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

5 months ago