Skip to content

Commit

Permalink
Remove minor-versioned executable
Browse files Browse the repository at this point in the history
python_version is currently wrong because of other macro overrides it
in openstack-macros. As having major-version binary link is good
enough for backwards compatibility until we get rid of versioned
binaries, let's remove the minor version one.

Change-Id: I7a5069fcedd137fa2dc6836258db1e851d5c6e87
  • Loading branch information
amoralej committed Oct 26, 2018
1 parent deb6e05 commit 6635ee4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions python-neutronclient.spec
@@ -1,10 +1,8 @@
# Macros for py2/py3 compatibility
%if 0%{?fedora} || 0%{?rhel} > 7
%global pyver %{python3_pkgversion}
%global __python %{__python3}
%else
%global pyver 2
%global __python %{__python2}
%endif
%global pyver_bin python%{pyver}
%global pyver_sitelib %python%{pyver}_sitelib
Expand Down Expand Up @@ -129,9 +127,9 @@ rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo

%install
%{pyver_install}
mv %{buildroot}%{_bindir}/%{cname} %{buildroot}%{_bindir}/%{cname}-%{python_version}
ln -s %{cname}-%{python_version} %{buildroot}%{_bindir}/%{cname}-%{pyver}
ln -s %{cname}-%{pyver} %{buildroot}%{_bindir}/%{cname}

# Create a versioned binary for backwards compatibility until everything is pure py3
ln -s %{cname} %{buildroot}%{_bindir}/%{cname}-%{pyver}

%check
# (TODO) Ignore unit tests results until https://bugs.launchpad.net/python-neutronclient/+bug/1783789
Expand All @@ -145,7 +143,6 @@ ln -s %{cname}-%{pyver} %{buildroot}%{_bindir}/%{cname}
%{pyver_sitelib}/*.egg-info
%{_bindir}/%{cname}
%{_bindir}/%{cname}-%{pyver}
%{_bindir}/%{cname}-%{python_version}
%exclude %{pyver_sitelib}/%{sname}/tests

%files -n python%{pyver}-%{sname}-tests
Expand Down

0 comments on commit 6635ee4

Please sign in to comment.