WxPython For Python 3.5.1

Hi,

How to build WxPython-Phoenix For Python 3.5.1 on Windows 64 bits with Visual Studio 2015 Community

Tested with wxPython_Phoenix-3.0.3.dev1927+e07098d

  • Get source:

http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev1927+e07098d.tar.gz

http://kent.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/Build%20WxPython%20PY35.txt

http://heanet.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/bin.zip

http://netcologne.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/BUILD3.bat

Here the wheel file:

http://netcologne.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/wxPython_Phoenix-3.0.3.dev1927%2Be07098d-cp35-cp35m-win_amd64.whl

Ph DALET

France

philippe DALET wrote:

Hi,

How to build WxPython-Phoenix For Python 3.5.1 on Windows 64 bits with Visual Studio 2015 Community
Tested with wxPython_Phoenix-3.0.3.dev1927+e07098d

- Get source:
http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev1927+e07098d.tar.gz

- Unrar source:

- Copy files from https://sourceforge.net/projects/pcpu/files/Python%203.4%203.5%20windows%20amd64/

http://kent.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/Build%20WxPython%20PY35.txt
http://heanet.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/bin.zip
http://netcologne.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/BUILD3.bat

Here the wheel file:
http://netcologne.dl.sourceforge.net/project/pcpu/Python%203.4%203.5%20windows%20amd64/wxPython_Phoenix-3.0.3.dev1927%2Be07098d-cp35-cp35m-win_amd64.whl

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

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

···

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

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...

···

--
Robin Dunn
Software Craftsman

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:

https://groups.google.com/forum/#!topic/wxpython-users/9cUXJVmE8MY

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

···

El martes, 1 de marzo de 2016, 0:33:04 (UTC+1), Robin Dunn escribió:

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…


Robin Dunn

Software Craftsman

http://wxPython.org

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.

···


Robin Dunn

Software Craftsman

http://wxPython.org

Thank you for answering so quickly.

···

El sábado, 5 de marzo de 2016, 1:59:15 (UTC+1), Robin Dunn escribió:

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.


Robin Dunn

Software Craftsman

http://wxPython.org

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

···

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