From f79ea6ebddbbb942a918d3b9ed970ef2e16e3344 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Jul 06 2017 01:27:27 +0000 Subject: python3 sipconfig.py: set proper sip_bin value --- diff --git a/sip-4.19.3-python3_sip_bin.patch b/sip-4.19.3-python3_sip_bin.patch new file mode 100644 index 0000000..81503ed --- /dev/null +++ b/sip-4.19.3-python3_sip_bin.patch @@ -0,0 +1,12 @@ +diff -up sip-4.19.3/configure.py.sip_bin sip-4.19.3/configure.py +--- sip-4.19.3/configure.py.sip_bin 2017-07-03 12:24:27.000000000 -0500 ++++ sip-4.19.3/configure.py 2017-07-05 20:21:24.376350683 -0500 +@@ -281,7 +281,7 @@ def create_config(module, template, macr + "sip_version": sip_version, + "sip_version_str": sip_version_str, + "platform": build_platform, +- "sip_bin": os.path.join(sip_bin_dir, "sip"), ++ "sip_bin": os.path.join(sip_bin_dir, "python3-sip"), + "sip_inc_dir": sip_inc_dir, + "sip_mod_dir": sip_module_dir, + "default_bin_dir": plat_bin_dir, diff --git a/sip.spec b/sip.spec index e2ac9b2..4911dca 100644 --- a/sip.spec +++ b/sip.spec @@ -17,7 +17,7 @@ Summary: SIP - Python/C++ Bindings Generator Name: sip Version: 4.19.3 -Release: 1%{?dist} +Release: 2%{?dist} # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison) License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) @@ -33,6 +33,8 @@ Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}%{?snap:-snapshot- Patch50: sip-4.18-no_strip.patch # try not to rpath the world (I *think* this may not be required anymore, since sip-4.19 -- rex) Patch51: sip-4.18-no_rpath.patch +# set sip_bin properly for python3 build (needswork to be upstreamable) +Patch52: sip-4.19.3-python3_sip_bin.patch # extracted from sip.h, SIP_API_MAJOR_NR SIP_API_MINOR_NR defines Source1: macros.sip @@ -117,7 +119,17 @@ classes library. %build +mkdir %{_target_platform} +pushd %{_target_platform} +%{__python2} ../configure.py \ + -d %{python2_sitearch} \ + CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LFLAGS="%{?__global_ldflags}" + +make %{?_smp_mflags} +popd + %if 0%{?with_python3} +patch -p1 < %{PATCH52} mkdir %{_target_platform}-python3 pushd %{_target_platform}-python3 %{__python3} ../configure.py \ @@ -129,15 +141,6 @@ make %{?_smp_mflags} popd %endif -mkdir %{_target_platform} -pushd %{_target_platform} -%{__python2} ../configure.py \ - -d %{python2_sitearch} \ - CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LFLAGS="%{?__global_ldflags}" - -make %{?_smp_mflags} -popd - %install # Perform the Python 3 installation first, to avoid stomping over the Python 2 @@ -193,6 +196,9 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %changelog +* Wed Jul 05 2017 Rex Dieter - 4.19.3-2 +- python3 sipconfig.py: set proper sip_bin value + * Wed Jul 05 2017 Rex Dieter - 4.19.3-1 - sip-4.19.3, sip-api(12)=12.2