From 35776c053e925de66b0d6d42b2f45754522744055f91db47ef8a3f4ce4c8e6f0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 15 May 2019 06:52:50 +0000 Subject: [PATCH] Accepting request 701249 from home:jaicaa:branches:network - Use temporary directory for python build. OBS-URL: https://build.opensuse.org/request/show/701249 OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=182 --- openvswitch.changes | 5 +++++ openvswitch.spec | 27 +++++++++------------------ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/openvswitch.changes b/openvswitch.changes index c9249d7..b3ca08c 100644 --- a/openvswitch.changes +++ b/openvswitch.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 6 17:08:26 UTC 2019 - + +- Use temporary directory for python build. + ------------------------------------------------------------------- Mon Apr 29 14:12:36 UTC 2019 - diff --git a/openvswitch.spec b/openvswitch.spec index 717f1c8..e9df9b8 100644 --- a/openvswitch.spec +++ b/openvswitch.spec @@ -400,10 +400,6 @@ pushd source touch resolv.conf export OVS_RESOLV_CONF=$(pwd)/resolv.conf -# Python build macros have moved out of the build directory some -# extra_dist files that are required for check, put them back. -cp python/_build.tmp/*.py python/build/ - # Recheck tests before we declare them broken. If that fails, dump # the log and exit. >2.5.0 uses the RECHECK env variable so this # needs to be taken into consideration for future releases. @@ -509,22 +505,17 @@ cp -a %{buildroot}%{_datadir}/openvswitch/python/ovstest \ %{buildroot}%{python2_sitelib} # Python subpackages -pushd source/python +# Build on a temporary directory. +pushd $(mktemp -d -p source/build-aux) +cp -a ../../python/* $(pwd)/ + +# Some build files are in sources while others are generated directly on +# buildroot as part of make_install (dirs.py), so update the former with the +# latter. +cp -a %{buildroot}%{_datadir}/openvswitch/python/* $(pwd)/ export LDFLAGS="${LDFLAGS} -L %{buildroot}%{_libdir}" -export CPPFLAGS="-I ../include" - -# Set python environment -sed \ - -e '/^##/d' \ - -e 's,[@]pkgdatadir[@],%{_datadir}/%{name},g' \ - -e 's,[@]RUNDIR[@],%{_rundir},g' \ - -e 's,[@]LOGDIR[@],%{_localstatedir}/log,g' \ - -e 's,[@]bindir[@],%{_bindir},g' \ - -e 's,[@]sysconfdir[@],%{_sysconfdir},g' \ - -e 's,[@]DBDIR[@],%{_sysconfdir}/%{name},g' \ - < ovs/dirs.py.template \ - > ovs/dirs.py +export CPPFLAGS="-I ../../include" %if 0%{?suse_version} # SLES