1import os 2import sipconfig 3 4# The name of the SIP build file generated by SIP and used by the build 5# system. 6build_file = "py_sems.sbf" 7 8# Get the SIP configuration information. 9config = sipconfig.Configuration() 10 11# Run SIP to generate the code. 12os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-r", "py_sems.sip"])) 13 14# Create the Makefile. 15makefile = sipconfig.SIPModuleMakefile(config, build_file, makefile="Makefile.gen") 16 17makefile.extra_cxxflags = ["-Wall -Wno-reorder -g"] 18makefile.extra_include_dirs = ["$(COREPATH)"] 19makefile.extra_lflags = ["-g"] 20makefile._warnings = 0 21 22# Generate the Makefile itself. 23makefile.generate() 24