-
-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create tools/build.py. Automate building C++ libs and subprocess and make it cross-platform. Windows platform already supported. #210
Comments
There is still issue with building vcproj files to be resolved. Currently supported on Windows is only Python 2.7 32-bit. Remove patch deps on Windows and Mac platforms to facilitate building (#300, #231, #251). Create tools/build.py and tools/build_module.py (#210). Cleanup in directories due to new build tools. Update tools/automate.py. DragData methods become Linux-only: GetImage(), HasImage(). This functionality will be available on all platforms when patch is merged into upstream (#251).
tools/build.py was already created. Building C++ projects is automated, however when new c++ files are added then manual modifications are required in makefiles on Mac/Linux and in .vcproj files on Windows. On Windows only Python 2.7 32-bit is currently supported and to support other platforms / python versions new .vcproj files need to be created. This still needs to be automated. To use a .vcproj template file and generate actual .vcproj files on the fly for given python/platform. Using setuptools would be cool, but this would require testing on all platforms. |
Commit 5f24f50 added On Linux/Mac C++ projects are still built using Makefiles. |
Currently on Windows when building the cefpython module you first need to build the C++ libraries and the subprocess executable by building vcproj files separately. It's a manual process that needs to be automated. On Linux/Mac it's better, the compile.py script will build the C++ libs and the subprocess executable automatically by running Makefile. However when making changes, these changes need to be done separately for Windows and for Mac/Linux. A cross-platform solution for building these libs/subprocess would be nice.
Solution 1: Cmake and Ninja
CMake - https://cmake.org/
Ninja - https://ninja-build.org/
Solution 2: setuptools
Looks like there may be an alternative to cmake/ninja. Turns out setuptools can not only build python modules, but also static libraries and executables. Search in Google for "setuptools + xxx" where xxx is:
Does setuptools have some kind of cache mechanism? So that it doesn't rebuild every time when there are no changes in sources?
Cmake seems complicated, things aren't easier than Makefiles, just provides cross-platform support. Using setuptools may be easier, it already takes care of detecting which VC++ compiler to use depending on Python version used. However distutils/setuptools documentation is very poor. I couldn't find any references to "StaticLib" and "Executable" classes referenced above. Some links:
The text was updated successfully, but these errors were encountered: