WxPython For Python 3.5.1

2 views
Skip to first unread message

philippe DALET

unread,
Feb 29, 2016, 10:10:50 AM2/29/16
to wxPython-dev

Robin Dunn

unread,
Feb 29, 2016, 3:00:32 PM2/29/16
to wxPyth...@googlegroups.com
I had intended to have Python3.5 builds ready by last night's build, but
apparently my Windows buildbot VM could not install VisStudio 2015
without getting some missing updates applied. (I also couldn't install
Python3.5 there because the vcredist refused to install itself.) It has
literally been almost a full day in downloading and installing updates
with still about 20 updates and some number of reboots to go, but
hopefully it will be ready in time for tonight's auto build.

Regardless, the current Phoenix master and the linked wxWidgets
submodule should work fine for building for Python 3.5 without needing
any extra files or tweaks. Using Phoenix's build.py should take care of
the rest. If it doesn't please let me know what is missing.


--
Robin Dunn
Software Craftsman
http://wxPython.org

Dietmar Schwertberger

unread,
Feb 29, 2016, 5:07:40 PM2/29/16
to wxPyth...@googlegroups.com
On 29.02.2016 21:00, Robin Dunn wrote:
> Regardless, the current Phoenix master and the linked wxWidgets
> submodule should work fine for building for Python 3.5 without needing
> any extra files or tweaks. Using Phoenix's build.py should take care
> of the rest. If it doesn't please let me know what is missing
I've just tested the current Git master.
On non-english installations the build with Visual Studio 2015 may fail
due to non-ASCII output of cl.exe:

ERROR: failed building wxWidgets
Traceback (most recent call last):
File "build.py", line 1141, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "D:\Python\Sources35\Phoenix\buildtools\build_wxwidgets.py",
line 439, in main
args.append("COMPILER_VERSION=%s" % getVisCVersion())
File "D:\Python\Sources35\Phoenix\buildtools\build_wxwidgets.py",
line 67, in getVisCVersion
text = getoutput("cl.exe")
File "D:\Python\Sources35\Phoenix\buildtools\build_wxwidgets.py",
line 163, in getoutput
output = output.decode('utf-8') # TODO: is utf-8 okay here?
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 62:
invalid start byte

The command line and output of cl.exe look like that for me:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe"
Microsoft (R) C/C++-Optimierungscompiler Version 19.00.23026 für x86


Please apply the encoding modification from config.py also to
build_wxwidgets.py.
But still the build may fail if the codepage is not 1252. Maybe build.py
should call "chcp 1252" or this should be added to the build instructions.
(The use of code page 1252 was recommended by the waf people when I
first ran into encoding problems.)


Regards,

Dietmar

Robin Dunn

unread,
Feb 29, 2016, 6:33:04 PM2/29/16
to wxPyth...@googlegroups.com
Dietmar Schwertberger wrote:
> Please apply the encoding modification from config.py also to
> build_wxwidgets.py.
> But still the build may fail if the codepage is not 1252. Maybe
> build.py should call "chcp 1252" or this should be added to the build
> instructions.
> (The use of code page 1252 was recommended by the waf people when I
> first ran into encoding problems.)

Thanks. I'll make that change and add a note to the README.

Ideally, now that build_wxwidgets.py has been moved into the Phoenix
tree we should refactor the common or otherwise similar helper code in
the various buildtools modules into a new module, but that can wait
until after more important things. I think there is still some unused
Classic build code in there after-all...

Lázaro Guillermo Pérez Montoto

unread,
Mar 1, 2016, 9:12:08 PM3/1/16
to wxPython-dev
Hi,

Using the build: wxPython_Phoenix-3.0.3.dev1943+fdf739f-cp35-cp35m-win_amd64.whl, 

the notebook methods SetSelection() and ChangeSelection() have a bug. Although everything 
seems to work well (the desired page is selected), the following error appears in the console: 

wx._core.wxAssertionError: C++ assertion "((nPage) < GetPageCount())" failed at ..\..\src\msw\notebook.cpp(355) in wxNotebook::SetSelection(): notebook page out of range


In last December after many attempts, following the steps commented in: 


and solving other some additional errors that arose me, I compiled the build:

wxPython_Phoenix-3.0.3.dev1836+f764b32.tar.gz

for python 3.5 on windows 10 64bits (wxPython_Phoenix-3.0.3.dev1836+f764b32-cp35-none-win_amd64.whl).

Everything looked good except the above methods, but in that case occurred a fatal error. 

Searching in google I found (http://trac.wxwidgets.org/ticket/16561) a solution to the error 
(in my case it worked):

I only change in:

 sip_corewxNotebook.cpp (1518)

size_t page;   ======> changed for ======> size_t page = 0;
sipParseKwdArgs(…)

i compile again and the the error fixed. 

Do you know if someone else mentioned this problem? 
Just happens to python 3.5? The same distribution compiled for 3.4 runs fine. 

Thank you. 

PD Excuse my bad English

Robin Dunn

unread,
Mar 4, 2016, 7:59:15 PM3/4/16
to wxPyth...@googlegroups.com
Lázaro Guillermo Pérez Montoto wrote:

Searching in google I found (http://trac.wxwidgets.org/ticket/16561) a solution to the error 
(in my case it worked):

I only change in:

 sip_corewxNotebook.cpp (1518)

size_t page;   ======> changed for ======> size_t page = 0;
sipParseKwdArgs(…)

i compile again and the the error fixed. 

Do you know if someone else mentioned this problem? 
Just happens to python 3.5? The same distribution compiled for 3.4 runs fine. 


Thanks, I see the problem and I'm working on it.  It's a bit tricky but should be solvable.

Lázaro Guillermo Pérez Montoto

unread,
Mar 5, 2016, 2:32:04 PM3/5/16
to wxPython-dev
Thank you for answering so quickly.

Dietmar Schwertberger

unread,
Mar 8, 2016, 6:36:02 PM3/8/16
to wxPyth...@googlegroups.com, vlastim...@gmail.com
On 29.02.2016 21:00, Robin Dunn wrote:
> Regardless, the current Phoenix master and the linked wxWidgets
> submodule should work fine for building for Python 3.5 without needing
> any extra files or tweaks. Using Phoenix's build.py should take care
> of the rest. If it doesn't please let me know what is missing
There's a small problem with the Python 3.5 .whl files for Windows.
Vlastimil Brom has reported this on wxpython-users.
The .pyd files have a dependency MSVCP140.DLL (for the 32 bit version).
When you have Visual Studio or the redistributable package installed,
this DLL is sitting in the system32 folder.
Vlastimil has found this DLL in his matplotlib installation. I've
checked and the DLL is actually in the matplotlib .whl file.
Would it be an option for Phoenix to include it as well? The Microsoft
license does allow this.

Of course, the best solution would be to have it in the Python installer
already, just as with vcruntime140.dll.


Regards,

Dietmar
Reply all
Reply to author
Forward
0 new messages