mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 03:50:06 +01:00
Merge pull request #1398 from wxWidgets/python-3.8
Changes needed for Python 3.8
(cherry picked from commit ec1600d2cd)
This commit is contained in:
@@ -17,7 +17,11 @@ jobs:
|
||||
python: 'python3.7'
|
||||
make_venv: 'python3.7 -m venv venv'
|
||||
venv_pkg: 'python3.7-venv'
|
||||
maxParallel: 3
|
||||
Py38:
|
||||
python: 'python3.8'
|
||||
make_venv: 'python3.8 -m venv venv'
|
||||
venv_pkg: 'python3.8-venv'
|
||||
maxParallel: 4
|
||||
|
||||
variables: {'PYTHONUNBUFFERED': '1'}
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ jobs:
|
||||
python_version: '3.7.3'
|
||||
python_pkg: 'python-3.7.3-macosx10.9.pkg'
|
||||
python: 'python3.7'
|
||||
maxParallel: 3
|
||||
Py38:
|
||||
python_version: '3.8.0'
|
||||
python_pkg: 'python-3.8.0-macosx10.9.pkg'
|
||||
python: 'python3.8'
|
||||
maxParallel: 4
|
||||
|
||||
|
||||
variables: {'PYTHONUNBUFFERED': '1'}
|
||||
|
||||
@@ -24,6 +24,15 @@ jobs:
|
||||
addToPath: true
|
||||
maxParallel: 4
|
||||
|
||||
# Py38_x86:
|
||||
# python.version: '3.8'
|
||||
# python.arch: x86
|
||||
# addToPath: true
|
||||
# Py38_x64:
|
||||
# python.version: '3.8'
|
||||
# python.arch: x64
|
||||
# addToPath: true
|
||||
|
||||
|
||||
variables: {'PYTHONUNBUFFERED': '1'}
|
||||
|
||||
|
||||
4
build.py
4
build.py
@@ -1519,9 +1519,9 @@ def copyWxDlls(options):
|
||||
dlls += glob.glob(os.path.join(cairo_root, arch, 'bin', '*.dll'))
|
||||
|
||||
# For Python 3.5 and 3.6 builds we also need to copy some VC14 redist DLLs.
|
||||
# NOTE: Do it for 3.7 too for now. But when we fully switch over to VS 2017
|
||||
# NOTE: Do it for 3.7+ too for now. But when we fully switch over to VS 2017
|
||||
# this may need to change. See notes in wscript about it.
|
||||
if PYVER in ['3.5', '3.6', '3.7']:
|
||||
if PYVER in ['3.5', '3.6', '3.7', '3.8']:
|
||||
redist_dir = os.path.join(
|
||||
phoenixDir(), 'packaging', 'Py3.5', 'vcredist',
|
||||
arch, 'Microsoft.VC140.CRT', '*.dll')
|
||||
|
||||
32
etg/app.py
32
etg/app.py
@@ -449,7 +449,10 @@ def run():
|
||||
called. This can be overridden in derived classes, but be sure to call
|
||||
this method from there.
|
||||
""",
|
||||
body="wx.StockGDI._initStockObjects()"),
|
||||
body="""\
|
||||
wx.StockGDI._initStockObjects()
|
||||
self.InitLocale()
|
||||
"""),
|
||||
|
||||
PyFunctionDef('__del__', '(self)',
|
||||
doc="",
|
||||
@@ -513,6 +516,32 @@ def run():
|
||||
self.stdioWin.size = size
|
||||
"""),
|
||||
|
||||
PyFunctionDef('InitLocale', '(self)',
|
||||
doc="""\
|
||||
Try to ensure that the C and Python locale is in sync with wxWidgets locale.
|
||||
""",
|
||||
body="""\
|
||||
self.ResetLocale()
|
||||
import locale
|
||||
loc, enc = locale.getlocale()
|
||||
# Try to set it to the same language as what is already set in the C locale
|
||||
info = wx.Locale.FindLanguageInfo(loc) if loc else None
|
||||
if info:
|
||||
self._initial_locale = wx.Locale(info.Language)
|
||||
else:
|
||||
# otherwise fall back to the system default
|
||||
self._initial_locale = wx.Locale(wx.LANGUAGE_DEFAULT)
|
||||
"""),
|
||||
|
||||
PyFunctionDef('ResetLocale', '(self)',
|
||||
doc="""\
|
||||
Release the wx.Locale object created in :meth:`InitLocale`.
|
||||
This will reset the application's locale to the previous settings.
|
||||
""",
|
||||
body="""\
|
||||
self._initial_locale = None
|
||||
"""),
|
||||
|
||||
PyFunctionDef('Get', '()', isStatic=True,
|
||||
doc="""\
|
||||
A staticmethod returning the currently active application object.
|
||||
@@ -523,7 +552,6 @@ def run():
|
||||
|
||||
|
||||
|
||||
|
||||
module.addPyClass('PySimpleApp', ['App'], deprecated="Use :class:`App` instead.",
|
||||
doc="""This class is deprecated. Please use :class:`App` instead.""",
|
||||
items=[
|
||||
|
||||
@@ -48,6 +48,10 @@ def run():
|
||||
c.find('WinSublang').ignore()
|
||||
c.find('GetLCID').ignore()
|
||||
|
||||
module.addItem(etgtools.WigCode("""\
|
||||
char* wxSetlocale(int category, const char *locale);
|
||||
"""))
|
||||
|
||||
|
||||
module.addPyCode("""\
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Runtime dependencies needed when using wxPython Phoenix
|
||||
numpy==1.16.1 ; python_version <= '2.7'
|
||||
numpy ; python_version >= '3.0'
|
||||
pillow
|
||||
# pillow ; sys_platform == 'win32' and python_version < '3.8'
|
||||
# pillow ; sys_platform != 'win32'
|
||||
six
|
||||
|
||||
2
wscript
2
wscript
@@ -84,7 +84,7 @@ def configure(conf):
|
||||
# On the other hand, microsoft says that v141 and v140 (Visual
|
||||
# Studio 2015) are binary compatible, so for now let's just drop
|
||||
# it back to "14.0" until I get all the details worked out for
|
||||
# using VS 2017 everywhere for Python 3.7.
|
||||
# using VS 2017 everywhere for Python 3.7+.
|
||||
msvc_version = '14.0'
|
||||
|
||||
# In some cases (Azure DevOps at least) we're getting "14.1" for Python
|
||||
|
||||
Reference in New Issue
Block a user