From 54aa2c6288779a1f462c947c0d87703cd135669f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Nov 15 2019 22:06:32 +0000 Subject: disable python2 support on f32+ (#1752802) --- diff --git a/sip.spec b/sip.spec index 6e158a1..4b38cd5 100644 --- a/sip.spec +++ b/sip.spec @@ -1,4 +1,7 @@ %bcond_without python3 +%if 0%{?fedora} < 32 +%bcond_without python2 +%endif %if %{with python3} %{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")} @@ -30,7 +33,7 @@ Summary: SIP - Python/C++ Bindings Generator Name: sip Version: 4.19.19 -Release: 3%{?dist} +Release: 4%{?dist} # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison) License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) @@ -83,6 +86,7 @@ class library. %description %_description +%if %{with python2} %if 0%{?no_namespace} %package -n python2-sip Summary: %summary @@ -127,6 +131,7 @@ Provides: python2-wx-siplib-api(%{_sip_api_major}) = %{_sip_api} Provides: python2-wx-siplib-api(%{_sip_api_major})%{?_isa} = %{_sip_api} %{?python_provide:%python_provide python2-wx-siplib} %description -n python2-wx-siplib %_description +%endif %if %{with python3} %if 0%{?no_namespace} @@ -188,6 +193,7 @@ This is the Python 3 build of wx-siplib. %build +%if %{with python2} %if 0%{?no_namespace} mkdir %{_target_platform}-python2 pushd %{_target_platform}-python2 @@ -229,6 +235,7 @@ pushd %{_target_platform}-python2-wx %make_build popd +%endif sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf %if %{with python3} @@ -297,6 +304,7 @@ mkdir -p %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack %endif # Python 2 installation: +%if %{with python2} %if 0%{?no_namespace} %make_install -C %{_target_platform}-python2 %endif @@ -304,6 +312,7 @@ mkdir -p %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack %make_install -C %{_target_platform}-python2-pyqt5 %make_install -C %{_target_platform}-python2-wx mv %{buildroot}%{python2_sitearch}/wx/sip.pyi %{buildroot}%{python2_sitearch}/wx/siplib.pyi +%endif # sip-wrapper install %{SOURCE10} %{buildroot}%{_bindir}/sip-pyqt4 @@ -332,6 +341,7 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %dir %{_datadir}/sip/ %{rpm_macros_dir}/macros.sip +%if %{with python2} %files -n python2-sip-devel %{_prefix}/include/python2.7/sip.h %{python2_sitearch}/sipconfig.py* @@ -364,6 +374,7 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %dir %{python2_sitearch}/wx/ %{python2_sitearch}/wx/siplib.* %{python2_sitearch}/wx_siplib-%{version}.dist-info/ +%endif %if %{with python3} %files -n python%{python3_pkgversion}-sip-devel @@ -405,6 +416,9 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %changelog +* Fri Nov 15 2019 Rex Dieter - 4.19.19-4 +- disable python2 support on f32+ (#1752802) + * Sun Nov 03 2019 Rex Dieter - 4.19.19-3 - revert virtual provides (bad idea)