4 from PyQt4 import pyqtconfig
6 # The name of the SIP build file generated by SIP and used by the build
8 build_file = "mussamod.sbf"
10 # Get the PyQt configuration information.
11 config = pyqtconfig.Configuration()
13 # Get the extra SIP flags needed by the imported qt module. Note that
14 # this normally only includes those flags (-x and -t) that relate to SIP's
16 qt_sip_flags = config.pyqt_sip_flags
18 # Run SIP to generate the code. Note that we tell SIP where to find the qt
19 # module's specification files using the -I flag.
20 os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-I", config.pyqt_sip_dir, qt_sip_flags, "mussamod.sip"]))
22 # We are going to install the SIP specification file for this module and
23 # its configuration module.
26 installs.append(["mussamod.sip", os.path.join(config.default_sip_dir, "mussa")])
28 #installs.append(["mussaconfig.py", config.default_mod_dir])
30 # Create the Makefile. The QtModuleMakefile class provided by the
31 # pyqtconfig module takes care of all the extra preprocessor, compiler and
32 # linker flags needed by the Qt library.
33 makefile = pyqtconfig.QtGuiModuleMakefile(
35 build_file=build_file,
39 # Add the library we are wrapping. The name doesn't include any platform
40 # specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
41 # ".dll" extension on Windows).
42 makefile.LFLAGS.append("-L../build/qui")
43 makefile.LFLAGS.append("-L../build/alg")
44 makefile.extra_include_dirs.append("..")
45 makefile.extra_libs = ["mussa_qui", "mussa_core",
47 "boost_serialization",
48 "boost_program_options"]
50 # Generate the Makefile itself.
53 # Now we create the configuration module. This is done by merging a Python
54 # dictionary (whose values are normally determined dynamically) with a
57 # # Publish where the SIP specifications for this module will be
59 # "mussa_sip_dir": config.default_sip_dir,
61 # # Publish the set of SIP flags needed by this module. As these are the
62 # # same flags needed by the qt module we could leave it out, but this
63 # # allows us to change the flags at a later date without breaking
64 # # scripts that import the configuration module.
65 # "mussa_sip_flags": qt_sip_flags
68 # This creates the quit_buttonconfig.py module from the quit_buttonconfig.py.in
69 # template and the dictionary.
70 #sipconfig.create_config_module("mussaconfig.py", "mussaconfig.py.in", content)