From 95b4a26c152347c15b367ca296948a5f75153672ef0ce14b68e346a9441394b7 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 7 Jun 2018 15:13:53 +0000 Subject: [PATCH 1/2] Accepting request 614297 from home:czerw:branches:X11:wxWidgets - Move "wx/*.so" libraries to main package, remove devel package (boo#1095747) - Add rpmlintrc file to filter devel-file-in-non-devel-package - Apply spec-cleaner OBS-URL: https://build.opensuse.org/request/show/614297 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=4 --- python-wxPython-rpmlintrc | 1 + python-wxPython.changes | 7 ++++ python-wxPython.spec | 81 ++++++++++++--------------------------- 3 files changed, 33 insertions(+), 56 deletions(-) create mode 100644 python-wxPython-rpmlintrc diff --git a/python-wxPython-rpmlintrc b/python-wxPython-rpmlintrc new file mode 100644 index 0000000..67d25fd --- /dev/null +++ b/python-wxPython-rpmlintrc @@ -0,0 +1 @@ +addFilter("devel-file-in-non-devel-package") diff --git a/python-wxPython.changes b/python-wxPython.changes index cd49269..b6d1f3f 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jun 4 09:11:22 UTC 2018 - petr@cervinka.net + +- Move "wx/*.so" libraries to main package, remove devel package (boo#1095747) +- Add rpmlintrc file to filter devel-file-in-non-devel-package +- Apply spec-cleaner + ------------------------------------------------------------------- Fri May 18 07:36:08 UTC 2018 - jengelh@inai.de diff --git a/python-wxPython.spec b/python-wxPython.spec index 775aba3..1caf38f 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -13,21 +13,28 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_with test -%bcond_with syswx %define oldpython python %define X_display ":98" +%bcond_with test +%bcond_with syswx +%if %{with syswx} +%define wx_args --use_syswx --gtk3 -v +%else +%define wx_args --gtk3 -v +%endif Name: python-wxPython Version: 4.0.1 Release: 0 -License: GPL-2.0+ Summary: The "Phoenix" variant of the wxWidgets Python bindings -Url: https://github.com/wxWidgets/Phoenix +License: GPL-2.0-or-later Group: Development/Languages/Python +URL: https://github.com/wxWidgets/Phoenix Source: https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-%{version}.tar.gz +Source1: python-wxPython-rpmlintrc BuildRequires: %{python_module devel} BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} @@ -36,6 +43,9 @@ BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gstreamer-plugins-base-devel BuildRequires: libjbig-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: xorg-x11-server BuildRequires: pkgconfig(cppunit) BuildRequires: pkgconfig(freeglut) BuildRequires: pkgconfig(gstreamer-1.0) @@ -50,29 +60,20 @@ BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: pkgconfig(x11) -BuildRequires: python-rpm-macros -BuildRequires: xorg-x11-server +Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives +Conflicts: python-wxWidgets +Provides: python-wxWidgets = %{version} %if %{with test} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module six} %endif -Requires: python-six %ifpython2 -Provides: %{oldpython}-wxWidgets = %version -Conflicts: otherproviders(%{oldpython}-wxWidgets) +Conflicts: %{oldpython}-wxWidgets +Provides: %{oldpython}-wxWidgets = %{version} %endif -Provides: python-wxWidgets = %version -Conflicts: otherproviders(python-wxWidgets) -Requires(post): update-alternatives -Requires(postun): update-alternatives -%if %{with syswx} -%define wx_args --use_syswx --gtk3 -v -%else -%define wx_args --gtk3 -v -%endif - - %python_subpackages %description @@ -89,38 +90,12 @@ Summary: Languages for package %{name} Group: System/Localization Requires: %{name} = %{version} Requires: python-base -Provides: %{name}-lang-all = %{version} Supplements: packageand(bundle-lang-other:%{name}) +Provides: %{name}-lang-all = %{version} %description lang Provides translations to the package %{name}. -%package devel -Summary: Development files for %{name} -Group: System/Localization -Requires: %{name} = %{version} -Requires: python-devel -Requires: c++_compiler -Requires: gstreamer-plugins-base-devel -Requires: libjbig-devel -Requires: pkgconfig(cppunit) -Requires: pkgconfig(freeglut) -Requires: pkgconfig(gstreamer-1.0) -Requires: pkgconfig(gtk+-3.0) -Requires: pkgconfig(libjpeg) -Requires: pkgconfig(liblzma) -Requires: pkgconfig(libmspack) -Requires: pkgconfig(libnotify) -Requires: pkgconfig(libpng16) -Requires: pkgconfig(libtiff-4) -Requires: pkgconfig(sdl2) -Requires: pkgconfig(sm) -Requires: pkgconfig(webkit2gtk-4.0) -Requires: pkgconfig(x11) - -%description devel -Files needed to build software that uses %{name}. - %prep %setup -q -n wxPython-%{version} sed -i -e '/^#!\//, 1d' wx/py/*.py @@ -177,8 +152,8 @@ mv wx_temp wx %python_uninstall_alternative pywxrc %files %{python_files} -%defattr(-,root,root) -%doc CHANGES.rst LICENSE.txt README.rst TODO.rst license/*.txt +%license LICENSE.txt +%doc CHANGES.rst README.rst TODO.rst license/*.txt %python_alternative %{_bindir}/helpviewer %python_alternative %{_bindir}/img2png %python_alternative %{_bindir}/img2py @@ -194,14 +169,8 @@ mv wx_temp wx %{python_sitearch}/wxPython-%{version}-py*.egg-info %{python_sitearch}/wx/ %exclude %{python_sitearch}/wx/locale/ -%exclude %{python_sitearch}/wx/*.so - -%files %{python_files devel} -%defattr(-,root,root) -%{python_sitearch}/wx/*.so %files %{python_files lang} -%defattr(-,root,root) %{python_sitearch}/wx/locale/ %changelog From 091834ce217aba92819069929008d80cf97d9a9a1ad336f1d0ecd78443e855de Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 13 Jun 2018 03:44:24 +0000 Subject: [PATCH 2/2] Accepting request 616403 from home:TheBlackCat:branches:X11:wxWidgets - Add fix_no_return_in_nonvoid.patch Fix lack of return in non-void function issue in generated sip bindings. OBS-URL: https://build.opensuse.org/request/show/616403 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=5 --- fix_no_return_in_nonvoid.patch | 20 ++++++++++++++++++++ python-wxPython.changes | 7 +++++++ python-wxPython.spec | 4 ++++ 3 files changed, 31 insertions(+) create mode 100644 fix_no_return_in_nonvoid.patch diff --git a/fix_no_return_in_nonvoid.patch b/fix_no_return_in_nonvoid.patch new file mode 100644 index 0000000..45a5a26 --- /dev/null +++ b/fix_no_return_in_nonvoid.patch @@ -0,0 +1,20 @@ +diff -U 3 -H -w -E -d -r -x .osc -- a/sip/cpp/sip_corewxTextCtrl.cpp b/sip/cpp/sip_corewxTextCtrl.cpp +--- a/sip/cpp/sip_corewxTextCtrl.cpp ++++ b/sip/cpp/sip_corewxTextCtrl.cpp +@@ -55,12 +55,16 @@ + { + #ifdef __WXMSW__ + return self->ShowNativeCaret(show); ++ #else ++ return false; + #endif + } + bool _wxTextCtrl_HideNativeCaret(wxTextCtrl* self) + { + #ifdef __WXMSW__ + return self->HideNativeCaret(); ++ #else ++ return false; + #endif + } + void _wxTextCtrl_write(wxTextCtrl* self, const wxString* text) diff --git a/python-wxPython.changes b/python-wxPython.changes index b6d1f3f..f6d1126 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 13 03:42:38 UTC 2018 - toddrme2178@gmail.com + +- Add fix_no_return_in_nonvoid.patch + Fix lack of return in non-void function issue in generated sip + bindings. + ------------------------------------------------------------------- Mon Jun 4 09:11:22 UTC 2018 - petr@cervinka.net diff --git a/python-wxPython.spec b/python-wxPython.spec index 1caf38f..c0fb77b 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -35,6 +35,8 @@ Group: Development/Languages/Python URL: https://github.com/wxWidgets/Phoenix Source: https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-%{version}.tar.gz Source1: python-wxPython-rpmlintrc +# PATCH-FIX-OPENSUSE fix_no_return_in_nonvoid.patch -- Fix lack of return in nonvoid functions +Patch0: fix_no_return_in_nonvoid.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} @@ -74,6 +76,7 @@ BuildRequires: %{python_module six} Conflicts: %{oldpython}-wxWidgets Provides: %{oldpython}-wxWidgets = %{version} %endif + %python_subpackages %description @@ -98,6 +101,7 @@ Provides translations to the package %{name}. %prep %setup -q -n wxPython-%{version} +%patch0 -p1 sed -i -e '/^#!\//, 1d' wx/py/*.py sed -i -e '/^#!\//, 1d' wx/tools/*.py sed -i -e '/^#!\//, 1d' wx/py/tests/*.py