forked from pool/python-wxPython
Accepting request 1139670 from X11:wxWidgets
OBS-URL: https://build.opensuse.org/request/show/1139670 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wxPython?expand=0&rev=20
This commit is contained in:
commit
7cf39611fe
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,7 +1,7 @@
|
|||||||
<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>
|
||||||
|
<package>python312</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 15 16:29:26 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- 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>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-wxPython
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -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
|
||||||
@ -57,13 +54,21 @@ ExclusiveArch: donotbuild
|
|||||||
%if "%flavor" != "python311"
|
%if "%flavor" != "python311"
|
||||||
%define skip_python311 1
|
%define skip_python311 1
|
||||||
%endif
|
%endif
|
||||||
|
%if "%flavor" != "python312"
|
||||||
|
%define skip_python312 1
|
||||||
|
%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
|
||||||
@ -95,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
|
||||||
@ -103,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
|
||||||
@ -134,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
|
||||||
@ -147,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}
|
||||||
@ -307,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