* Fix test issues with wx.lib.introspect (#2717) * Add support for building on Windows ARM64 (#2521) * Incorporate many improvements to type stubs (#2665) * Fix building documentation with latest sphinx (#2672) * Build smaller architecture-specific wheels on macOS instead of large universal2 wheels * Calculate scroll based on child's relative position to scrolledpanel in wx.lib.scrolledpanel * Fix float -> int conversion issues in wx.lib.fancytext (#2703) * Replace deprecated NumPy type aliases * Use wx.StaticText in wx.lib.agw.hyperlink (#2686) * Implement partial support for pyproject.toml and other build process improvements * Remove use of six and most Python 2 compatibility code * Fix wxWidgets build on OpenSUSE (#558, #1067, #2422, #2532) * Fix more int conversions in wx.lib.agw.flatnotebook * Make build output reproducible * Enable overridding wx.Sizer.InformFirstDirection() (#2452) * Implement __iter__ for wxList iterator classes (fixes Python 3.13.1 issue) * Fix wx.lib.mixins.rubberband not clearing DC on redraw * Support implementing CreateBitmapBundle for custom ArtProvider * Fix float/int conversion issues in wx.lib.ogl * Include usage of wxMemoryFSHandler in webview demo * Fix crash when accessing wx.stc.StyledTextCtrl.DropTarget.Data (#2043) * Fix AuiManager pane minimizing issue * Add range field to wx.lib.agw.pygauge.PyGauge format string (#2583) * Fix pickling of wx.RealPoint (#2644) * Avoid calling FlatMenu Destroy() in a finally block (#2630) * Update wxApp.IsDisplayAvailable to work on Wayland * Fix InspectionTool crashes due to bad perspective string errors * Drop support for Python 3.8 (EOL) * Add CreateAccessible for Windows only * Added check condition to AuiManager LoadPerspective() * Fix RecursionError in platebtn bitmap getters * Add Python implementation of GetPaths (#1944) * Support Wayland GTK backend in Window.GetHandle * Refactor python only pdfviewer to support displaying pdf files where not all pages have the same size * Improve support when specifying a pre-existing toolbar as the target for the restore icon when minimizing a pane in agw.aui * Multiple bugfixes in pure python aui * pdfviewer: Add support for pymupdf renaming - remove python-3.13.1.patch OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=71
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
From 00ba66a86f65abb24402427d66bf50e8da477321 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
Date: Tue, 28 Jun 2022 18:16:34 +0200
|
|
Subject: [PATCH 3/4] Make pip usage in wxget optional
|
|
|
|
As the code states, using pip to download is abusing it, and as it is
|
|
just a fallback in case neither wget nor urllib works.
|
|
---
|
|
wx/tools/wxget.py | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/wx/tools/wxget.py b/wx/tools/wxget.py
|
|
index c83ced7a..75eb0f47 100644
|
|
--- a/wx/tools/wxget.py
|
|
+++ b/wx/tools/wxget.py
|
|
@@ -33,7 +33,6 @@ import os
|
|
import wx
|
|
import subprocess
|
|
import ssl
|
|
-import pip
|
|
|
|
if sys.version_info >= (3,):
|
|
from urllib.error import (HTTPError, URLError)
|
|
@@ -44,6 +43,11 @@ else:
|
|
from urllib2 import (HTTPError, URLError)
|
|
import urlparse
|
|
|
|
+try:
|
|
+ import pip
|
|
+except ImportError as e:
|
|
+ pip = None
|
|
+
|
|
def get_docs_demo_url(demo=False):
|
|
""" Get the URL for the docs or demo."""
|
|
if demo:
|
|
@@ -196,8 +200,8 @@ def download_file(url, dest=None, force=False, trusted=False):
|
|
success = download_wget(url, filename, trusted) # Try wget
|
|
if not success:
|
|
success = download_urllib(url, filename) # Try urllib
|
|
- if not success:
|
|
- success = download_pip(url, filename, force, trusted) # Try urllib
|
|
+ if not success and pip not None:
|
|
+ success = download_pip(url, filename, force, trusted) # Try pip
|
|
if not success:
|
|
split_url = url.split('/')
|
|
msg = '\n'.join([
|
|
--
|
|
2.36.1
|
|
|