#2 Conditionalize the Python 2 subpackage
Closed 6 years ago by cstratak. Opened 6 years ago by cstratak.
Unknown source f28  into  f28

file modified
+25 -7
@@ -1,8 +1,16 @@

- %if 0%{?fedora} || 0%{?rhel} >= 7

+ %if 0%{?fedora} || 0%{?rhel} > 7

+ # Enable python3 build by default

  %bcond_without python3

- %else  # 0#{?fedora} || 0#{?rhel} >= 7

+ %else

  %bcond_with python3

- %endif # 0#{?fedora} || 0#{?rhel} >= 7

+ %endif

+ 

+ %if 0%{?rhel} > 7

+ # Disable python2 build by default

+ %bcond_with python2

+ %else

+ %bcond_without python2

+ %endif

  

  # this is only turned on during transitional periods

  %{?python3_next_pkgversion: %global with_python3_next 1}
@@ -12,7 +20,7 @@

  

  Name:           python-xapp

  Version:        1.0.1

- Release:        8%{?dist}

+ Release:        9%{?dist}

  Summary:        %{sum}

  

  License:        LGPLv2
@@ -26,7 +34,7 @@

  %description

  %{sum}.

  

- 

+ %if %{with python2}

  %package -n python2-xapp

  Summary:       %{sum}

  
@@ -44,7 +52,7 @@

  

  %description -n python2-xapp

  %{sum}.

- 

+ %endif # with python2

  

  %if %{with python3}

  %package -n python%{python3_pkgversion}-xapp
@@ -59,7 +67,7 @@

  

  %if ("python%{python3_pkgversion}-xapp" != "python3-xapp") && !0%{?with_python3_next}

  Provides:      python3-xapp = %{version}-%{release}

- %endif

+ %endif # with python3

  

  %description -n python%{python3_pkgversion}-xapp

  %{sum}.
@@ -91,7 +99,9 @@

  

  

  %build

+ %if %{with python2}

  %py2_build

+ %endif # with python2

  %if %{with python3}

  %py3_build

  %endif # with python3
@@ -101,7 +111,9 @@

  

  

  %install

+ %if %{with python2}

  %py2_install

+ %endif # with python2

  %if %{with python3}

  %py3_install

  %endif # with python3
@@ -110,11 +122,13 @@

  %endif # with_python3_next

  

  

+ %if %{with python2}

  %files -n python2-xapp

  %license COPYING debian/copyright

  %doc AUTHORS PKG-INFO README TODO debian/changelog

  %{python2_sitelib}/xapp

  %{python2_sitelib}/python_xapp-%{version}-py%{python2_version}.egg-info

+ %endif # with python2

  

  

  %if %{with python3}
@@ -136,6 +150,10 @@

  

  

  %changelog

+ * Mon Mar 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.0.1-9

+ - Conditionalize the Python 2 subpackage

+ - Don't build the Python 2 subpackage on EL > 7

+ 

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

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

  

Don't build the Python 2 subpackage on EL > 7

This is not a priority currently thus closing this PR.

Pull-Request has been closed by cstratak

6 years ago