forked from pool/python-wxPython
Jan Engelhardt
2955e5c25f
* Added wrappers for the OSXEnableAutomaticQuoteSubstitution, * Many of the deprecated items in wxWidgets and wxPython are being or have been removed. Be sure to test your code in a recent 4.0.x release with warnings enabled so you can see which class, method or function calls * Bug fixes in wx.lib.calendar: key navigation across month boundaries is * Switch to using a wx.Overlay in the Widget Inspection Tool to highlight * Fixed issue in wx.lib.agw.customtreectrl where the label editor could widgets like wx.ListCtrl, wx.TreeCtrl and wx.dataview.DataViewCtrl. * The wx.WS_EX_VALIDATE_RECURSIVELY extended style flag is obsolete, as it is now the default (and only) behavior. The style flag has been added back into wxPython for compatibility, but with a zero value. You can just * Fix a sometimes crash when using a wx.Overlay by letting the wx.DCOverlay * Replaced the Vagrant VMs used for building wxPython for various Linux distros * Added the wx.svg package which contains code for parsing SVG (Scalable Vector Graphics) files, and also code for integrating with wxPython. It can rasterize the SVG to a wx.Bitmap of any size with no loss of quality, and it can also render the SVG directly to a * Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of maintaining its own pointer. This way, if the wxApp is created by C++ * Added wx.adv.GenericAnimationCtrl so the generic version of the animation classes can be used even on the platforms that have a native version. Note that due to internal changes to support both types of animations, some API changes in how the Animation objects are created. See the * Added wrappers for the wx.grid.GridBlockCoords, wx.grid.GridBlocks, and wx.grid.GridBlockDiffResult classes, as well as associated new methods in the wx.grid.Grid class. These provide a new way to interact with blocks which should be a more efficient (time and memory) way to process large * Fixed issue when sys.prefix is not unicode (Python2) and when its contents OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=55
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
|
|
|