forked from pool/python-wxPython
Accepting request 1137308 from home:bnavigator:branches:devel:languages:python
- Update buildset: * Tumbleweed: Prepare python312, drop python38 * 15.X: Prepare for "SLE15 Python module pythons" (The repository does not have all the requirements yet to build) - Add 0001-wxWidgets-Phoenix-integer-division.patch * Required for Python 3.12 * gh#wxWidgets/Phoenix#2508 - Update requirements: * This version requires Pillow again. * Require numpy for all flavors: Add require-numpy.patch * Upstream goes back and forth, see https://github.com/wxWidgets/Phoenix/commits/master/requirements/install.txt - Repack the source: Remove stray wxWidgets-4.1.0 tree OBS-URL: https://build.opensuse.org/request/show/1137308 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=47
This commit is contained in:
parent
1ec08ac40f
commit
c5aed123df
25
0001-wxWidgets-Phoenix-integer-division.patch
Normal file
25
0001-wxWidgets-Phoenix-integer-division.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 3b042c863f4092f802a877a972fd6eb284451a78 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ben Greiner <code@bnavigator.de>
|
||||||
|
Date: Sat, 6 Jan 2024 21:58:29 +0100
|
||||||
|
Subject: [PATCH] integer division for randint
|
||||||
|
|
||||||
|
Python 3.12 does not accept floats for random.randint() anymore
|
||||||
|
---
|
||||||
|
unittests/test_dcDrawLists.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/unittests/test_dcDrawLists.py b/unittests/test_dcDrawLists.py
|
||||||
|
index 9e35e5eaf..6696a79a0 100644
|
||||||
|
--- a/unittests/test_dcDrawLists.py
|
||||||
|
+++ b/unittests/test_dcDrawLists.py
|
||||||
|
@@ -63,8 +63,8 @@ def makeRandomRectangles():
|
||||||
|
rects = []
|
||||||
|
|
||||||
|
for i in range(num):
|
||||||
|
- W = random.randint(10, w/2)
|
||||||
|
- H = random.randint(10, h/2)
|
||||||
|
+ W = random.randint(10, w//2)
|
||||||
|
+ H = random.randint(10, h//2)
|
||||||
|
x = random.randint(0, w - W)
|
||||||
|
y = random.randint(0, h - H)
|
||||||
|
rects.append( (x, y, W, H) )
|
@ -1,6 +1,5 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
<package>python3</package>
|
<package>python3</package>
|
||||||
<package>python38</package>
|
|
||||||
<package>python39</package>
|
<package>python39</package>
|
||||||
<package>python310</package>
|
<package>python310</package>
|
||||||
<package>python311</package>
|
<package>python311</package>
|
||||||
|
@ -3,6 +3,23 @@ Mon Jan 15 16:29:26 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
|||||||
|
|
||||||
- Enable python312 as valid multibuild flavor.
|
- Enable python312 as valid multibuild flavor.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jan 6 21:47:42 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update buildset:
|
||||||
|
* Tumbleweed: Prepare python312, drop python38
|
||||||
|
* 15.X: Prepare for "SLE15 Python module pythons" (The repository
|
||||||
|
does not have all the requirements yet to build)
|
||||||
|
- Add 0001-wxWidgets-Phoenix-integer-division.patch
|
||||||
|
* Required for Python 3.12
|
||||||
|
* gh#wxWidgets/Phoenix#2508
|
||||||
|
- Update requirements:
|
||||||
|
* This version requires Pillow again.
|
||||||
|
* Require numpy for all flavors: Add require-numpy.patch
|
||||||
|
* Upstream goes back and forth, see
|
||||||
|
https://github.com/wxWidgets/Phoenix/commits/master/requirements/install.txt
|
||||||
|
- Repack the source: Remove stray wxWidgets-4.1.0 tree
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 27 07:37:06 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
|
Wed Dec 27 07:37:06 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
@ -45,9 +45,6 @@ ExclusiveArch: donotbuild
|
|||||||
# Extraneous build_flavors and skips are excluded automatically so future
|
# Extraneous build_flavors and skips are excluded automatically so future
|
||||||
# additions can be included here early and old flavors can be removed some time
|
# additions can be included here early and old flavors can be removed some time
|
||||||
# after the global drop in Factory.
|
# after the global drop in Factory.
|
||||||
%if "%flavor" != "python38"
|
|
||||||
%define skip_python38 1
|
|
||||||
%endif
|
|
||||||
%if "%flavor" != "python39"
|
%if "%flavor" != "python39"
|
||||||
%define skip_python39 1
|
%define skip_python39 1
|
||||||
%endif
|
%endif
|
||||||
@ -61,12 +58,17 @@ ExclusiveArch: donotbuild
|
|||||||
%define skip_python312 1
|
%define skip_python312 1
|
||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
# SLE/Leap: python3 only
|
# SLE/Leap
|
||||||
%if "%flavor" != "python3"
|
%if "%flavor" == "python3"
|
||||||
%define pythons %{nil}
|
# python3 is the old 3.6
|
||||||
%else
|
|
||||||
%define pythons python3
|
%define pythons python3
|
||||||
%define python3_provides %{nil}
|
%define python3_provides %{nil}
|
||||||
|
%else
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
%if "%flavor" != "%pythons"
|
||||||
|
# sle15_python_module_pythons defines the flavor, otherwise don't build
|
||||||
|
%define pythons %{nil}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
# The obs server-side interpreter cannot use lua or rpm shrink
|
# The obs server-side interpreter cannot use lua or rpm shrink
|
||||||
@ -98,6 +100,8 @@ Patch1: 0001-Update-wxTextCtrl-OSX-overrides-since-they-re-now-do.patch
|
|||||||
Patch2: 0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
|
Patch2: 0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
|
||||||
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2497
|
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2497
|
||||||
Patch3: 0001-Support-building-with-Doxygen-1.9.7.patch
|
Patch3: 0001-Support-building-with-Doxygen-1.9.7.patch
|
||||||
|
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2508
|
||||||
|
Patch4: 0001-wxWidgets-Phoenix-integer-division.patch
|
||||||
# PATCH-FIX-OPENSUSE
|
# PATCH-FIX-OPENSUSE
|
||||||
Patch12: use_stl_build.patch
|
Patch12: use_stl_build.patch
|
||||||
# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2232
|
# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2232
|
||||||
@ -106,9 +110,11 @@ Patch13: 0003-Make-pip-usage-in-wxget-optional.patch
|
|||||||
Patch14: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch
|
Patch14: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch
|
||||||
# PATCH-FIX-OPENSUSE - Test fixes/additions:
|
# PATCH-FIX-OPENSUSE - Test fixes/additions:
|
||||||
Patch112: 0001-Check-HSV-values-in-image-test.patch
|
Patch112: 0001-Check-HSV-values-in-image-test.patch
|
||||||
|
# PATCH-FIX-OPENSUSE - Numpy for Python 3.12 is a thing
|
||||||
|
Patch113: require-numpy.patch
|
||||||
|
# TODO: Replace deprecated setup.py calls in build.py with PEP517 without building wxWidgets into the wheel
|
||||||
BuildRequires: %{python_module base}
|
BuildRequires: %{python_module base}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module requests}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: c++_compiler
|
BuildRequires: c++_compiler
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -137,6 +143,8 @@ BuildRequires: pkgconfig(webkit2gtk-4.0)
|
|||||||
BuildRequires: pkgconfig(x11)
|
BuildRequires: pkgconfig(x11)
|
||||||
BuildRequires: pkgconfig(xtst)
|
BuildRequires: pkgconfig(xtst)
|
||||||
%endif
|
%endif
|
||||||
|
Requires: %{pprefix}-Pillow
|
||||||
|
Requires: %{pprefix}-numpy
|
||||||
Requires: %{pprefix}-six
|
Requires: %{pprefix}-six
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun):update-alternatives
|
||||||
@ -150,6 +158,7 @@ Provides: %{python_provides}-wxWidgets = %{version}
|
|||||||
Obsoletes: %{python_provides}-wxPython < %{version}-%{release}
|
Obsoletes: %{python_provides}-wxPython < %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module Pillow}
|
||||||
BuildRequires: %{python_module numpy}
|
BuildRequires: %{python_module numpy}
|
||||||
BuildRequires: %{python_module pytest-forked}
|
BuildRequires: %{python_module pytest-forked}
|
||||||
BuildRequires: %{python_module pytest-xdist}
|
BuildRequires: %{python_module pytest-xdist}
|
||||||
@ -310,7 +319,7 @@ mv wx_temp wx
|
|||||||
%python_alternative %{_bindir}/wxdemo
|
%python_alternative %{_bindir}/wxdemo
|
||||||
%python_alternative %{_bindir}/wxdocs
|
%python_alternative %{_bindir}/wxdocs
|
||||||
%python_alternative %{_bindir}/wxget
|
%python_alternative %{_bindir}/wxget
|
||||||
%{python_sitearch}/wxPython-*-py*.egg-info
|
%{python_sitearch}/wxPython-%{version}-py*.egg-info
|
||||||
%{python_sitearch}/wx/
|
%{python_sitearch}/wx/
|
||||||
%if %{without syswx}
|
%if %{without syswx}
|
||||||
%exclude %{python_sitearch}/wx/locale/
|
%exclude %{python_sitearch}/wx/locale/
|
||||||
|
11
require-numpy.patch
Normal file
11
require-numpy.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
Revert https://github.com/wxWidgets/Phoenix/commit/b1c55639dfb73db3a11307c9de888540cec512df
|
||||||
|
|
||||||
|
--- a/requirements/install.txt 2023-06-07 01:31:16.000000000 +0000
|
||||||
|
+++ b/requirements/install.txt 2024-01-06 22:08:26.485981672 +0000
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
# Runtime dependencies needed when using wxPython Phoenix
|
||||||
|
-numpy < 1.17 ; python_version <= '2.7'
|
||||||
|
-numpy ; python_version >= '3.0' and python_version < '3.12'
|
||||||
|
+numpy
|
||||||
|
pillow
|
||||||
|
six
|
BIN
wxPython-4.2.1.tar.gz
(Stored with Git LFS)
BIN
wxPython-4.2.1.tar.gz
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue
Block a user