Hello community,

here is the log from the commit of package openvswitch for openSUSE:Factory 
checked in at 2018-11-13 17:00:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openvswitch (Old)
 and      /work/SRC/openSUSE:Factory/.openvswitch.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openvswitch"

Tue Nov 13 17:00:45 2018 rev:33 rq:648463 version:2.10.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/openvswitch/openvswitch.changes  2018-10-25 
09:11:29.382320420 +0200
+++ /work/SRC/openSUSE:Factory/.openvswitch.new/openvswitch.changes     
2018-11-13 17:30:28.473211980 +0100
@@ -1,0 +2,15 @@
+Thu Nov  8 11:17:38 UTC 2018 - Markos Chandras <[email protected]>
+
+- Improve python packaging (bsc#1115085)
+  * Rename python*-openvswitch subpackages to python*-ovs to follow
+    the openSUSE policy that packages should be named after the modules
+    they install.
+  * Build the JSON C bindings and as a result the 'noarch' BuildArch
+    needs to be removed.
+  * Drop the python*-openvswitch-test packages and merge them with the
+    test subpackage
+  * Build the python bindings using setuptools
+  * Include the egg-info package.
+  * Use libopenvswitch as dependency to python bindings
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openvswitch.spec ++++++
--- /var/tmp/diff_new_pack.5dvBhB/_old  2018-11-13 17:30:30.033209838 +0100
+++ /var/tmp/diff_new_pack.5dvBhB/_new  2018-11-13 17:30:30.037209833 +0100
@@ -78,6 +78,7 @@
 Obsoletes:      %{name}-switch < 2.7.0
 %if 0%{?suse_version}
 BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module six}
 BuildRequires:  %{python_module xml}
 BuildRequires:  fdupes
@@ -93,6 +94,7 @@
 BuildRequires:  python-devel
 BuildRequires:  python-six
 BuildRequires:  python2-rpm-macros
+BuildRequires:  python2-setuptools
 BuildRequires:  python3-rpm-macros
 BuildRequires:  systemd-units
 Requires(post): systemd-units
@@ -268,58 +270,32 @@
 
 Open vSwitch is a full-featured software-based Ethernet switch.
 
-%package -n python2-openvswitch
+%package -n python2-ovs
 Summary:        Python2 bindings for Open vSwitch
 License:        Apache-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch-common = %{version}
+Requires:       %{lname} = %{version}
 Requires:       python2
 Requires:       python2-six
-Provides:       python-openvswitch = %{version}
-Obsoletes:      python-openvswitch < 2.8.1
-BuildArch:      noarch
+Provides:       python-%{name} = %{version}
+Provides:       python2-%{name} = %{version}
+Obsoletes:      python-%{name} < 2.8.1
+Obsoletes:      python2-%{name} < 2.10.1
 
-%description -n python2-openvswitch
+%description -n python2-ovs
 This package contains the Python2 bindings for Open vSwitch database.
 
-%package -n python2-openvswitch-test
-Summary:        Python2 bindings for Open vSwitch
-License:        Apache-2.0
-Group:          Productivity/Networking/System
-Requires:       openvswitch-common = %{version}
-Requires:       python2
-Requires:       python2-Twisted
-Requires:       python2-openvswitch = %{version}
-Provides:       python-openvswitch-test = %{version}
-Obsoletes:      python-openvswitch-test < 2.8.1
-BuildArch:      noarch
-
-%description -n python2-openvswitch-test
-This package contains the Python bindings for Open vSwitch database.
-
-%package -n python3-openvswitch
+%package -n python3-ovs
 Summary:        Python3 bindings for Open vSwitch
 License:        Apache-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch-common = %{version}
+Requires:       %{lname} = %{version}
 Requires:       python3
 Requires:       python3-six
-BuildArch:      noarch
-
-%description -n python3-openvswitch
-This package contains the Python3 bindings for Open vSwitch database.
-
-%package -n python3-openvswitch-test
-Summary:        Python3 bindings for Open vSwitch
-License:        Apache-2.0
-Group:          Productivity/Networking/System
-Requires:       openvswitch-common = %{version}
-Requires:       python3
-Requires:       python3-Twisted
-Requires:       python3-openvswitch = %{version}
-BuildArch:      noarch
+Provides:       python3-%{name} = %{version}
+Obsoletes:      python3-%{name} < 2.10.1
 
-%description -n python3-openvswitch-test
+%description -n python3-ovs
 This package contains the Python3 bindings for Open vSwitch database.
 
 %package test
@@ -327,7 +303,9 @@
 License:        Apache-2.0
 Group:          Productivity/Networking/System
 Requires:       %{name} = %{version}
-Requires:       python3-openvswitch-test = %{version}
+Requires:       python2
+Requires:       python2-Twisted
+Requires:       python2-ovs = %{version}
 Provides:       %{name}-dpdk-test = %{version}
 Obsoletes:      %{name}-dpdk-test < 2.7.0
 
@@ -383,9 +361,9 @@
     < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
     > rhel/usr_lib_systemd_system_ovs-vswitchd.service
 
-%if 0%{?suse_version}
-export PYTHON='%{_bindir}/python3'
-%endif
+# This is only used for building the ovstest module
+export PYTHON='%{_bindir}/python2'
+
 %configure \
         --disable-static \
         --enable-libcapng \
@@ -485,27 +463,33 @@
 
 popd
 
+# Tests
+mkdir -p %{buildroot}%{python2_sitelib}
+cp -a %{buildroot}%{_datadir}/openvswitch/python/ovstest \
+    %{buildroot}%{python2_sitelib}
+
 # Python subpackages
-# SLES
+pushd source/python
+
+export LDFLAGS="${LDFLAGS} -L %{buildroot}%{_libdir}"
+export CPPFLAGS="-I ../include"
+
 %if 0%{?suse_version}
-mkdir -p %{buildroot}%{python2_sitelib}
-cp -a %{buildroot}%{_datadir}/openvswitch/python/* 
%{buildroot}%{python2_sitelib}
-# Build the byte compiled files
-%py_compile %{buildroot}%{python2_sitelib}
-%fdupes %{buildroot}%{python2_sitelib}
-mkdir -p %{buildroot}%{python3_sitelib}
-cp -a %{buildroot}%{_datadir}/openvswitch/python/* 
%{buildroot}%{python3_sitelib}
-# Build the byte compiled files
-%py3_compile %{buildroot}%{python3_sitelib}
-%fdupes %{buildroot}%{python3_sitelib}
+# SLES
+%{python_build}
+%{python_install}
+%fdupes %{buildroot}%{python2_sitearch}
+%fdupes %{buildroot}%{python3_sitearch}
+
 %else
 # RHEL
-install -d -m 0755 %{buildroot}%{python2_sitelib}
-cp -a %{buildroot}%{_datadir}/openvswitch/python/* \
-    %{buildroot}%{python2_sitelib}
+%py2_build
+%py2_install
 # No python3 for RHEL. We are missing python3-* packages from EPEL
 %endif
 
+popd
+
 rm -rf %{buildroot}%{_datadir}/openvswitch/python
 
 find %{buildroot} -type f -name "*.la" -delete -print
@@ -880,9 +864,7 @@
 %files doc
 %exclude %{_docdir}/%{name}/AUTHORS.rst
 %exclude %{_docdir}/%{name}/CONTRIBUTING.rst
-%exclude %{_docdir}/%{name}/LICENSE
 %exclude %{_docdir}/%{name}/NEWS
-%exclude %{_docdir}/%{name}/NOTICE
 %exclude %{_docdir}/%{name}/README.rst
 %{_docdir}/%{name}/
 
@@ -905,18 +887,14 @@
 %{_datadir}/openvswitch/scripts/ovs-vtep
 %{_datadir}/openvswitch/vtep.ovsschema
 
-%files -n python2-openvswitch
-%{python2_sitelib}/ovs/
-
-%files -n python2-openvswitch-test
-%{python2_sitelib}/ovstest/
+%files -n python2-ovs
+%{python2_sitearch}/ovs/
+%{python2_sitearch}/ovs-*.egg-info
 
 %if 0%{?suse_version}
-%files -n python3-openvswitch
-%{python3_sitelib}/ovs/
-
-%files -n python3-openvswitch-test
-%{python3_sitelib}/ovstest/
+%files -n python3-ovs
+%{python3_sitearch}/ovs/
+%{python3_sitearch}/ovs-*.egg-info
 %endif
 
 %files ovn-docker
@@ -985,6 +963,7 @@
 %{_mandir}/man8/ovs-l3ping.8%{?ext_man}
 %{_mandir}/man8/ovs-tcpdump.8%{?ext_man}
 %{_mandir}/man8/ovs-testcontroller.8%{?ext_man}
+%{python2_sitelib}/ovstest/
 
 %files devel
 %{_libdir}/libofproto.so


Reply via email to