diff --git a/sip.spec b/sip.spec index 6f36f25..56b118e 100644 --- a/sip.spec +++ b/sip.spec @@ -1,4 +1,4 @@ -%if 0%{?fedora} > 12 || 0%{?rhel} > 7 +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 %global with_python3 1 %endif @@ -20,7 +20,7 @@ Summary: SIP - Python/C++ Bindings Generator Name: sip Version: 4.19.7 -Release: 2%{?dist} +Release: 3%{?dist} # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison) License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) @@ -96,26 +96,26 @@ BuildArch: noarch %description macros This package contains RPM macros for use when working with SIP. %if 0%{?with_python3} -It is used by both the sip-devel (python 2) and python3-sip-devel subpackages. +It is used by both the sip-devel (python 2) and python%{python3_pkgversion}-sip-devel subpackages. %endif %if 0%{?with_python3} -%package -n python3-sip +%package -n python%{python3_pkgversion}-sip Summary: SIP - Python 3/C++ Bindings Generator -BuildRequires: python3-devel -Provides: python3-sip-api(%{_sip_api_major}) = %{_sip_api} -Provides: python3-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api} -%description -n python3-sip +BuildRequires: python%{python3_pkgversion}-devel +Provides: python%{python3_pkgversion}-sip-api(%{_sip_api_major}) = %{_sip_api} +Provides: python%{python3_pkgversion}-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api} +%description -n python%{python3_pkgversion}-sip This is the Python 3 build of SIP. %_description -%package -n python3-sip-devel +%package -n python%{python3_pkgversion}-sip-devel Summary: Files needed to generate Python 3 bindings for any C++ class library Requires: %{name}-macros = %{version}-%{release} -Requires: python3-sip%{?_isa} = %{version}-%{release} -Requires: python3-devel -%description -n python3-sip-devel +Requires: python%{python3_pkgversion}-sip%{?_isa} = %{version}-%{release} +Requires: python%{python3_pkgversion}-devel +%description -n python%{python3_pkgversion}-sip-devel This package contains files needed to generate Python 3 bindings for any C++ classes library. %endif @@ -189,7 +189,7 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %{rpm_macros_dir}/macros.sip %if 0%{?with_python3} -%files -n python3-sip +%files -n python%{python3_pkgversion}-sip %doc NEWS README %license LICENSE LICENSE-GPL2 LICENSE-GPL3 %{python3_sitearch}/sip.so @@ -197,7 +197,7 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %{python3_sitearch}/__pycache__/* %exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack -%files -n python3-sip-devel +%files -n python%{python3_pkgversion}-sip-devel # Note that the "sip" binary is invoked by name in a few places higher up # in the KDE-Python stack; these will need changing to "python3-sip": %{_bindir}/python3-sip @@ -207,6 +207,9 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %changelog +* Sat Mar 03 2018 Sérgio Basto - 4.19.7-3 +- Enable python3 on epel7 + * Fri Feb 09 2018 Fedora Release Engineering - 4.19.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild