Install wxPython 4 for MSYS2

nepix32 : May
15 07:37AM -0700

Is it even possible under Windows for a Python 3.6 to use
another compiler
than VC++ 2015? I remember that the last Python I was able
to compile C
extensions with mingw32 was Python 3.4.

    Not sure.  MSYS2 has the following python3

packages, and they seemed be compiled with GCC.

$ pacman -Ss python3 | grep 3.6

  `          mingw32/mingw-w64-i686-python3 3.6.5-1

[installed]`

  `          mingw64/mingw-w64-x86_64-python3 3.6.5-1

[installed]`

  `msys/python 3.6.2-1 [installed]`



  `$ /mingw32/bin/python3`

  `          Python 3.6.5 (default, Apr 16 2018,

10:30:41) [GCC 7.3.0 32 bit] on win32`

  `          Type "help", "copyright", "credits" or

“license” for more information.`

  `$ /usr/bin/python3`

  `          Python 3.6.2 (default, Sep  7 2017,

13:16:50)`

  `[GCC 6.3.0] on msys`

  `          Type "help", "copyright", "credits" or

“license” for more information.`
Anyway I came to the conclusion that using
prebuilt libraries wont work unless using the exact same
compiler, which means I can’t use the wxPython as that uses VC++
(I think).

    The only way to use it with MSYS2/MINGW,

would be to build it from sources with MSYS2/MINGW tools.

Thanks, Brendan.

···

nepix32@gmail.com

nepix32 nepix32@gmail.com : May
15 07:37AM -0700

    >

    > Is it even possible under Windows for a Python 3.6 to use

another compiler

    > than VC++ 2015? I remember that the last Python I was able

to compile C

    > extensions with mingw32 was Python 3.4.
    Not sure.  MSYS2 has the following python3

packages, and they seemed be compiled with GCC.

$ pacman -Ss python3 | grep 3.6

  `          mingw32/mingw-w64-i686-python3 3.6.5-1

[installed]`

  `mingw64/mingw-w64-x86_64-          python3 3.6.5-1

[installed]`

  `msys/python 3.6.2-1 [installed]`



  `$ /mingw32/bin/python3`

  `          Python 3.6.5 (default, Apr 16 2018,

10:30:41) [GCC 7.3.0 32 bit] on win32`

  `          Type "help", "copyright", "credits" or

“license” for more information.`

  `$ /usr/bin/python3`

  `          Python 3.6.2 (default, Sep  7 2017,

13:16:50)`

  `[GCC 6.3.0] on msys`

  `          Type "help", "copyright", "credits" or

“license” for more information.`
Anyway I came to the conclusion that using
prebuilt libraries wont work unless using the exact same
compiler, which means I can’t use the wxPython as that uses VC++
(I think).

Yes, C-only extensions can usually be pounded into shape that would allow mixed compiler use, at least with older versions of everything the last time I tried to do it. However mixing C++ is more difficult or impossible, even with Python itself being C-only.

    The only way to use it with MSYS2/MINGW,

would be to build it from sources with MSYS2/MINGW tools.

It’s probably doable, but wxPython’s build.py (and the other modules it uses) would need to have some work done to support it. If you work on this please do submit a PR for it. A work-in-progress PR would be okay too as that’s a good way to give feedback or provide help if needed.

···

On Tuesday, May 15, 2018 at 5:06:58 PM UTC-7, Brendan Simon wrote:

Robin