Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a6333d1

Browse filesBrowse files
committed
Make wxversion optional during setup
We don't need it in the backend anymore so might as well make it optional here too
1 parent 28ccfa9 commit a6333d1
Copy full SHA for a6333d1

File tree

Expand file treeCollapse file tree

1 file changed

+11
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-9
lines changed

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
+11-9Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,20 +1849,22 @@ class BackendWxAgg(OptionalBackendPackage):
18491849
name = "wxagg"
18501850

18511851
def check_requirements(self):
1852+
wxversioninstalled = True
18521853
try:
18531854
import wxversion
18541855
except ImportError:
1855-
raise CheckFailed("requires wxPython")
1856+
wxversioninstalled = False
18561857

1857-
try:
1858-
_wx_ensure_failed = wxversion.AlreadyImportedError
1859-
except AttributeError:
1860-
_wx_ensure_failed = wxversion.VersionError
1858+
if wxversioninstalled:
1859+
try:
1860+
_wx_ensure_failed = wxversion.AlreadyImportedError
1861+
except AttributeError:
1862+
_wx_ensure_failed = wxversion.VersionError
18611863

1862-
try:
1863-
wxversion.ensureMinimal('2.8')
1864-
except _wx_ensure_failed:
1865-
pass
1864+
try:
1865+
wxversion.ensureMinimal('2.8')
1866+
except _wx_ensure_failed:
1867+
pass
18661868

18671869
try:
18681870
import wx

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.