5804b9a
%global pkgname wxpython4
5804b9a
%global srcname wxPython
0bbb1b8
%bcond_without tests
5804b9a
%global sum New implementation of wxPython, a GUI toolkit for Python
5804b9a
%global desc \
5804b9a
wxPython4 is a is a new implementation of wxPython focused on improving speed,\
5804b9a
maintainability and extensibility. Just like "Classic" wxPython it wraps the\
5804b9a
wxWidgets C++ toolkit and provides access to the user interface portions of the\
5804b9a
wx API, enabling Python applications to have a GUI on Windows, Macs or Unix\
5804b9a
systems with a native look and feel and requiring very little (if any) platform\
5804b9a
specific code.
5804b9a
5804b9a
Name:           python-wxpython4
6f7f42a
Version:        4.2.1
73402eb
Release:        6%{?dist}
5804b9a
Summary:        %{sum}
5804b9a
# wxPython is licensed under the wxWidgets license.  The only exception is
5804b9a
# the pubsub code in wx/lib/pubsub which is BSD licensed.  Note: wxPython
5804b9a
# includes a bundled copy of wxWidgets in ext/wxWidgets which has a few
5804b9a
# bits of code that use other licenses.  This source is not used in the
5804b9a
# Fedora build, except for the interface headers in ext/wxWidgets/interface
5804b9a
# and the doxygen build scripts.
5804b9a
License:        wxWidgets and BSD
5804b9a
URL:            https://www.wxpython.org/
5804b9a
Source0:        https://files.pythonhosted.org/packages/source/w/%{srcname}/%{srcname}-%{version}.tar.gz
5804b9a
fda5b83
Patch:          https://github.com/wxWidgets/Phoenix/commit/aeb557d01e7cd37176ebbf0f1ae6d0b53c115378.patch
73402eb
Patch:          https://github.com/wxWidgets/Phoenix/commit/6a049ccc0ad96f25c3f7d8540b218ffe8921d8c5.patch
46eb04f
2e8895b
BuildRequires:  gcc-c++
5804b9a
BuildRequires:  doxygen
349fde4
BuildRequires:  waf
0c07719
BuildRequires:  wxGTK-devel
5804b9a
# For tests
5804b9a
%if %{with tests}
ef788ff
BuildRequires:  glibc-langpack-en
5fb8a78
BuildRequires:  mesa-dri-drivers
5804b9a
BuildRequires:  xorg-x11-server-Xvfb
a759001
BuildRequires:  python3-numpy
a759001
BuildRequires:  python3-pytest
8871689
BuildRequires:  python3-pytest-forked
a759001
BuildRequires:  python3-pytest-timeout
a759001
BuildRequires:  python3-pytest-xdist
5fb8a78
BuildRequires:  vulkan-loader
5804b9a
%endif
5804b9a
5804b9a
%description %{desc}
5804b9a
5804b9a
%package -n python3-%{pkgname}
5804b9a
Summary:        %{sum}
5804b9a
%{?python_provide:%python_provide python3-%{pkgname}}
fda5b83
BuildRequires:  python3-cython
5804b9a
BuildRequires:  python3-devel
ef788ff
BuildRequires:  python3-pillow
5804b9a
BuildRequires:  python3-setuptools
5804b9a
BuildRequires:  python3-six
1791e6c
BuildRequires:  python3dist(sip) >= 6.6.2
ef788ff
Requires:       python3-pillow
5804b9a
Requires:       python3-six
5804b9a
5804b9a
%description -n python3-%{pkgname} %{desc}
5804b9a
5804b9a
%package -n python3-%{pkgname}-media
5804b9a
Summary:        %{sum} (media module)
5804b9a
%{?python_provide:%python_provide python3-%{pkgname}-media}
5804b9a
Requires:       python3-%{pkgname}%{?_isa} = %{version}-%{release}
5804b9a
5804b9a
%description -n python3-%{pkgname}-media %{desc}
5804b9a
This package provides the wx.media module.
5804b9a
5804b9a
%package -n python3-%{pkgname}-webview
5804b9a
Summary:        %{sum} (webview module)
5804b9a
%{?python_provide:%python_provide python3-%{pkgname}-webview}
5804b9a
Requires:       python3-%{pkgname}%{?_isa} = %{version}-%{release}
5804b9a
5804b9a
%description -n python3-%{pkgname}-webview %{desc}
5804b9a
This package provides the wx.html2 module.
5804b9a
5804b9a
%package        doc
5804b9a
Summary:        Documentation and samples for wxPython
5804b9a
BuildArch:      noarch
5804b9a
5804b9a
%description doc
5804b9a
Documentation, samples and demo application for wxPython.
5804b9a
5804b9a
5804b9a
%prep
ca72715
%autosetup -n %{srcname}-%{version} -p1
5804b9a
5804b9a
rm -rf wx/py/tests
5804b9a
rm -f docs/sphinx/_downloads/i18nwxapp/i18nwxapp.zip
5804b9a
cp -a wx/lib/pubsub/LICENSE_BSD_Simple.txt license
5804b9a
# Remove env shebangs from various files
5804b9a
sed -i -e '/^#!\//, 1d' demo/*.py{,w}
5804b9a
sed -i -e '/^#!\//, 1d' demo/agw/*.py
5804b9a
sed -i -e '/^#!\//, 1d' docs/sphinx/_downloads/i18nwxapp/*.py
5804b9a
sed -i -e '/^#!\//, 1d' samples/floatcanvas/*.py
5804b9a
sed -i -e '/^#!\//, 1d' samples/mainloop/*.py
5804b9a
sed -i -e '/^#!\//, 1d' samples/ribbon/*.py
5804b9a
sed -i -e '/^#!\//, 1d' wx/py/*.py
5804b9a
sed -i -e '/^#!\//, 1d' wx/tools/*.py
5804b9a
# Fix end of line encodings
5804b9a
sed -i 's/\r$//' docs/sphinx/_downloads/*.py
5804b9a
sed -i 's/\r$//' docs/sphinx/rest_substitutions/snippets/python/contrib/*.py
5804b9a
sed -i 's/\r$//' docs/sphinx/rest_substitutions/snippets/python/converted/*.py
5804b9a
sed -i 's/\r$//' docs/sphinx/_downloads/i18nwxapp/locale/I18Nwxapp.pot
5804b9a
sed -i 's/\r$//' docs/sphinx/make.bat
5804b9a
sed -i 's/\r$//' docs/sphinx/phoenix_theme/theme.conf
5804b9a
sed -i 's/\r$//' samples/floatcanvas/BouncingBall.py
5804b9a
# Remove spurious executable perms
5804b9a
chmod -x demo/*.py
5804b9a
chmod -x samples/mainloop/mainloop.py
5804b9a
chmod -x samples/printing/sample-text.txt
5804b9a
# Remove empty files
5804b9a
find docs/sphinx/rest_substitutions/snippets/python/converted -size 0 -delete
5804b9a
# Convert files to UTF-8
5804b9a
for file in demo/TestTable.txt docs/sphinx/_downloads/i18nwxapp/locale/I18Nwxapp.pot docs/sphinx/class_summary.pkl docs/sphinx/wx.1moduleindex.pkl; do
5804b9a
    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
5804b9a
    touch -r $file $file.new && \
5804b9a
    mv $file.new $file
5804b9a
done
5804b9a
5804b9a
%build
73402eb
DOXYGEN=%{_bindir}/doxygen WAF=%{_bindir}/waf %{__python3} -u build.py dox touch etg --nodoc sip build_py --use_syswx --gtk3
5804b9a
5804b9a
5804b9a
%install
5804b9a
%{__python3} build.py install_py --destdir=%{buildroot}
5804b9a
rm -f %{buildroot}%{_bindir}/*
5804b9a
# Remove locale files (they are provided by wxWidgets)
5804b9a
rm -rf %{buildroot}%{python3_sitearch}/wx/locale
5804b9a
5804b9a
%check
5804b9a
%if %{with tests}
0c07719
SKIP_TESTS="'not (test_frameRestore or test_newIdRef03)'"
504f7ee
xvfb-run -a %{__python3} build.py test --pytest_timeout=60 --extra_pytest="-k $SKIP_TESTS" --verbose || true
5804b9a
%endif
5804b9a
5804b9a
5804b9a
%files -n python3-%{pkgname}
ca72715
%license license/*
5804b9a
%{python3_sitearch}/*
5804b9a
%exclude %{python3_sitearch}/wx/*html2*
5804b9a
%exclude %{python3_sitearch}/wx/__pycache__/*html2*
5804b9a
%exclude %{python3_sitearch}/wx/*media*
5804b9a
%exclude %{python3_sitearch}/wx/__pycache__/*media*
5804b9a
5804b9a
%files -n python3-%{pkgname}-media
5804b9a
%{python3_sitearch}/wx/*media*
5804b9a
%{python3_sitearch}/wx/__pycache__/*media*
5804b9a
5804b9a
%files -n python3-%{pkgname}-webview
5804b9a
%{python3_sitearch}/wx/*html2*
5804b9a
%{python3_sitearch}/wx/__pycache__/*html2*
5804b9a
5804b9a
%files doc
ca72715
%doc docs demo samples
ca72715
%license license/*
5804b9a
5804b9a
5804b9a
%changelog
73402eb
* Sat Jan 27 2024 Scott Talbert <swt@techie.net> - 4.2.1-6
73402eb
- Revert back to generating code and apply patches to fix FTBFS
73402eb
81854d0
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-5
81854d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
81854d0
fda5b83
* Fri Dec 01 2023 Scott Talbert <swt@techie.net> - 4.2.1-4
fda5b83
- BR python3-cython to fix FTBFS with Python 3.13 (#2252055)
fda5b83
5f98365
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-3
5f98365
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
5f98365
46eb04f
* Tue Jun 27 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 4.2.1-2
46eb04f
- Backport patches needed for compatibility with Python 3.12
46eb04f
6f7f42a
* Mon Jun 19 2023 Scott Talbert <swt@techie.net> - 4.2.1-1
6f7f42a
- Update to new upstream release 4.2.1 (#2208211 #2213374)
2a9731b
- Temporarily use upstream generated cpp files (broken by doxygen)
8871689
- Add missing BR for python3-pytest-forked to fix tests
6f7f42a
4d18ddb
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 4.2.0-4
4d18ddb
- Rebuilt for Python 3.12
4d18ddb
80cdcf7
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-3
80cdcf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
80cdcf7
e65fd6f
* Wed Nov 23 2022 Scott Talbert <swt@techie.net> - 4.2.0-2
e65fd6f
- Rebuild due to wxGLCanvas ABI change
e65fd6f
0c07719
* Mon Aug 08 2022 Scott Talbert <swt@techie.net> - 4.2.0-1
0c07719
- Update to new upstream release 4.2.0 (#1827788)
0c07719
4b08cd8
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.7-32
4b08cd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
4b08cd8
1791e6c
* Tue Jul 19 2022 Scott Talbert <swt@techie.net> - 4.0.7-31
1791e6c
- Update to build with sip 6.6.2+
1791e6c
ee47623
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 4.0.7-30
ee47623
- Rebuilt for Python 3.11
ee47623
917d957
* Tue Mar 08 2022 Scott Talbert <swt@techie.net> - 4.0.7-29
917d957
- Fix even more Python 3.10 int/float issues (#2060854)
917d957
b8b9030
* Wed Feb 16 2022 Scott Talbert <swt@techie.net> - 4.0.7-28
b8b9030
- Fix additional Python 3.10 issues
b8b9030
5fb8a78
* Wed Feb 16 2022 Scott Talbert <swt@techie.net> - 4.0.7-27
5fb8a78
- Add more test BRs and enable more tests
5fb8a78
3a2e4f3
* Mon Feb 14 2022 Scott Talbert <swt@techie.net> - 4.0.7-26
3a2e4f3
- Remove hard-coded references to siplib versions
3a2e4f3
a0e1b14
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.7-25
a0e1b14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
a0e1b14
1d5fd72
* Tue Dec 28 2021 Scott Talbert <swt@techie.net> - 4.0.7-24
1d5fd72
- Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
1d5fd72
f55a17c
* Wed Dec 22 2021 Scott Talbert <swt@techie.net> - 4.0.7-23
f55a17c
- Fix a bunch of Python 3.10 issues
f55a17c
dac9dc4
* Mon Oct 11 2021 Scott Talbert <swt@techie.net> - 4.0.7-22
dac9dc4
- Fix build with sip 6.2.0
dac9dc4
30d3535
* Wed Aug 04 2021 Scott Talbert <swt@techie.net> - 4.0.7-21
30d3535
- Remove patch for UnicodeDecodeError due to proper fix in sip
30d3535
a2cd2bd
* Tue Aug 03 2021 Scott Talbert <swt@techie.net> - 4.0.7-20
a2cd2bd
- Fix UnicodeDecodeError on package import due to sip 6 (#1988466)
a2cd2bd
e488001
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.7-19
e488001
- Second attempt - Rebuilt for
e488001
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
e488001
dae7df8
* Tue Jul 20 2021 Scott Talbert <swt@techie.net> - 4.0.7-18
dae7df8
- Fix building with sip 6
dae7df8
9d26549
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 4.0.7-17
9d26549
- Rebuilt for Python 3.10
9d26549
1a13814
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.7-16
1a13814
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
1a13814
1e58cdf
* Fri Jan 15 20:38:35 EST 2021 Scott Talbert <swt@techie.net> - 4.0.7-15
1e58cdf
- Switch to building with sip 5
1e58cdf
61a41ef
* Mon Jan 11 21:38:13 EST 2021 Scott Talbert <swt@techie.net> - 4.0.7-14
61a41ef
- Fix FTBFS with doxygen 1.9.1
61a41ef
f5471fb
* Thu Nov 26 09:38:13 EST 2020 Scott Talbert <swt@techie.net> - 4.0.7-13
f5471fb
- Backport upstream fix for wxPseudoDC.FindObjects crash (#1901912)
f5471fb
4f6a9dd
* Thu Nov  5 19:46:11 EST 2020 Scott Talbert <swt@techie.net> - 4.0.7-12
4f6a9dd
- Backport upstream fix for wxCustomDataObject.GetData crash
4f6a9dd
7a9cb25
* Sat Oct 31 2020 Scott Talbert <swt@techie.net> - 4.0.7-11
7a9cb25
- Fix crash in wxCustomDataObject.GetData
7a9cb25
51cb9e1
* Wed Aug 12 2020 Scott Talbert <swt@techie.net> - 4.0.7-10
51cb9e1
- Remove BD on python3-pathlib2 (not needed)
51cb9e1
44e2003
* Mon Aug 03 2020 Scott Talbert <swt@techie.net> - 4.0.7-9
44e2003
- Rebuild with latest wxGTK3 build to fix missing symbol issue (#1862822)
44e2003
16ef7cd
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.7-8
16ef7cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
16ef7cd
54aaff8
* Thu Jul 23 2020 Scott Talbert <swt@techie.net> - 4.0.7-7
54aaff8
- Fix FTBFS with sip 4.19.23
54aaff8
525f9ee
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 4.0.7-6
525f9ee
- Rebuilt for Python 3.9
525f9ee
27f0ee5
* Mon Feb 10 2020 Miro Hrončok <mhroncok@redhat.com> - 4.0.7-5
27f0ee5
- Rebuilt to fix an undefined symbol (#1801244)
27f0ee5
d8e6c70
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.7-4
d8e6c70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d8e6c70
349fde4
* Sat Jan 11 2020 Scott Talbert <swt@techie.net> - 4.0.7-3
349fde4
- Build using unbundled copy of waf (#1789646)
349fde4
3bba4ff
* Thu Nov 07 2019 Scott Talbert <swt@techie.net> - 4.0.7-2
3bba4ff
- Remove BR on python-PyPDF2 - PDF tests are disabled by default anyway
3bba4ff
0290444
* Sat Oct 26 2019 Scott Talbert <swt@techie.net> - 4.0.7-1
0290444
- Update to new upstream release 4.0.7 (#1765757)
0290444
ca72715
* Mon Sep 16 2019 Scott Talbert <swt@techie.net> - 4.0.6-9
ca72715
- Remove Python 2 subpackages (#1629793)
ca72715
91e543a
* Thu Aug 29 2019 Scott Talbert <swt@techie.net> - 4.0.6-8
91e543a
- Switch to using private sip module, wx.siplib (#1739469)
91e543a
7efd6ec
* Wed Aug 28 2019 Scott Talbert <swt@techie.net> - 4.0.6-7
7efd6ec
- Fix FloatCanvas with Python 3.8 (time.clock removed)
7efd6ec
f981d1a
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 4.0.6-6
f981d1a
- Rebuilt for Python 3.8
f981d1a
cf4b0e6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.6-5
cf4b0e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cf4b0e6
a759001
* Thu Jul 25 2019 Scott Talbert <swt@techie.net> - 4.0.6-4
a759001
- Stop running tests for Python 2 to release some Py2 dependencies
a759001
3626389
* Wed Jul 17 2019 Scott Talbert <swt@techie.net> - 4.0.6-3
3626389
- Fix FTBFS due to easy_install switch to Python 3
3626389
bb30c19
* Fri Jun 28 2019 Rex Dieter <rdieter@fedoraproject.org> - 4.0.6-2
bb30c19
- >= sip-api
bb30c19
3b0c38f
* Tue May 21 2019 Scott Talbert <swt@techie.net> - 4.0.6-1
3b0c38f
- Update to new upstream release 4.0.6 (#1711733)
3b0c38f
18d4c1b
* Sat May 18 2019 Scott Talbert <swt@techie.net> - 4.0.4-4
18d4c1b
- Fix FTBFS with Python 3.8 (#1710767)
18d4c1b
efe0b3b
* Sat Apr 06 2019 Scott Talbert <swt@techie.net> - 4.0.4-3
efe0b3b
- Fix FTBFS with SIP 4.19.14 (#1696302)
efe0b3b
d3622d9
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.4-2
d3622d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d3622d9
ef788ff
* Mon Jan 07 2019 Scott Talbert <swt@techie.net> - 4.0.4-1
ef788ff
- New upstream release 4.0.4
ef788ff
504f7ee
* Tue Nov 20 2018 Scott Talbert <swt@techie.net> - 4.0.1-11
504f7ee
- Fix tests
504f7ee
19c6557
* Sat Oct 27 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 4.0.1-10
19c6557
- Rebuilt for sip update
19c6557
9ebcbf1
* Mon Jul 16 2018 Scott Talbert <swt@techie.net> - 4.0.1-9
9ebcbf1
- Replace use of python3-sip binary with sip (fixes FTBFS)
9ebcbf1
- Use sip-api macros to ensure dependency on correct sip module version
9ebcbf1
bd86a21
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-8
bd86a21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
bd86a21
0bbb1b8
* Wed Jun 20 2018 Scott Talbert <swt@techie.net> - 4.0.1-7
0bbb1b8
- Re-enable tests but enable pytest-timeout
0bbb1b8
87bc0b2
* Wed Jun 20 2018 Scott Talbert <swt@techie.net> - 4.0.1-6
87bc0b2
- Cherry-pick waf 2.0.7 updates to fix Python 3.7 FTBFS (#1593029)
87bc0b2
3233905
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.0.1-5
3233905
- Rebuilt for Python 3.7
3233905
2e8895b
* Mon Feb 19 2018 Scott Talbert <swt@techie.net> - 4.0.1-4
2e8895b
- Add missing BR for gcc-c++
2e8895b
5804b9a
* Thu Feb 15 2018 Scott Talbert <swt@techie.net> - 4.0.1-3
5804b9a
- Second round of review comment fixes
5804b9a
5804b9a
* Tue Feb 13 2018 Scott Talbert <swt@techie.net> - 4.0.1-2
5804b9a
- Address initial review comments
5804b9a
- Fix rpmlint errors
5804b9a
- Fix and enable tests (but they are still not required to pass)
5804b9a
5804b9a
* Wed Feb 07 2018 Scott Talbert <swt@techie.net> - 4.0.1-1
5804b9a
- Initial packaging