Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

build system

Open kdschlosser opened this issue 3 years ago • 0 comments

@RobinD42

I wrote a script that detects MSVC compilers starting with Visual C 2008 and supports Visual C, Visual Studio, Visual C Build Tools, Visual Studio Build Tools and also the Python 2.7 Build Tools. It detects Windows SDKs >= 6.0a as well as all .NET versions. It does this without using the vcvars*.bat files and on >= Visual Studio 2017 and >= Build Tools 2017 it uses COM interfaces to collect data from any installations that are present. I was planning on submitting a PR for it pretty soon.

wxPython does compile properly when running Python 3.10 and using Visual Studio 2022. I have added the code to a branch on my fork of Phoenix and you can have a look at it if you like.

I am bringing this up because I started to look over the code in the build system for wxPython and thought this could be made so it is easier to manage and also easier to understand what is going on. I have a build system that I started to write and ended up not needing. It is almost complete and could be very easily modified to work for wxPython. It would merge the setup program and the build program into a single system. as it sits it supports Cygwin, Darwin, FreeBSD, SunOS, Windows and most other Linux flavors. It detects cl, link, clang, clang++, gcc, g++, cc, c++, gmake, ranlib, ld and ar. It also works with Cython and I am sure it can be adapted to work with SIP. It also ties in sphinx, handles compiling dyanmic libraries, static libraries and also python c extension modules.

The best part about it is it's ability to use all cores on a CPU. This decreases the build time down to single_core_build_time * (1.0 / n) were n is the number of cores in the processor. It does this without using the multiprocessing module or running more then a single instance of Python.

I am more then happy to share the build system if you are interested in it. I would need help breaking apart/untangling the current build system into pieces that are specific to an operating system and pieces that are shared.

Let me know if it is something you wish to tackle or if you are fine with the current build system.

Thanks, Kevin

kdschlosser avatar Jan 17 '22 07:01 kdschlosser