def inform_user(): """Tell the user the option values that are going to be used. """ sipconfig.inform("PyQt %s is being used." % pyqt.pyqt_version_str) sipconfig.inform( "Qt v%s %s edition is being used." % (sipconfig.version_to_string(pyqt.qt_version), pyqt.qt_edition)) sipconfig.inform("SIP %s is being used." % pyqt.sip_version_str) sipconfig.inform("The QScintilla module will be installed in %s." % opts.qscimoddir) sipconfig.inform("The QScintilla API file will be installed in %s." % os.path.join(opts.qscidir, "api", "python")) sipconfig.inform("The QScintilla .sip files will be installed in %s." % opts.qscisipdir) if opts.no_docstrings: sipconfig.inform( "The QScintilla module is being built without generated docstrings." ) else: sipconfig.inform( "The QScintilla module is being built with generated docstrings.") if opts.prot_is_public: sipconfig.inform( "The QScintilla module is being built with 'protected' redefined as 'public'." )
def inform_user(): """Tell the user the option values that are going to be used. """ sipconfig.inform("PyQt %s is being used." % pyqt.pyqt_version_str) sipconfig.inform("Qt v%s %s edition is being used." % (sipconfig.version_to_string(pyqt.qt_version), pyqt.qt_edition)) sipconfig.inform("SIP %s is being used." % pyqt.sip_version_str) sipconfig.inform("The Fresh module will be installed in %s." % opts.freshmoddir) sipconfig.inform("The Fresh API file will be installed in %s." % os.path.join(opts.freshdir, "api", "python")) sipconfig.inform("The Fresh .sip files will be installed in %s." % opts.freshsipdir) if opts.no_docstrings: sipconfig.inform("The Fresh module is being built without generated docstrings.") else: sipconfig.inform("The Fresh module is being built with generated docstrings.")
def inform_user(): """Tell the user the option values that are going to be used. """ sipconfig.inform("PyQt %s is being used." % pyqt.pyqt_version_str) sipconfig.inform("Qt v%s %s edition is being used." % (sipconfig.version_to_string(pyqt.qt_version), pyqt.qt_edition)) sipconfig.inform("SIP %s is being used." % pyqt.sip_version_str) sipconfig.inform("The QScintilla module will be installed in %s." % opts.qscimoddir) sipconfig.inform("The QScintilla API file will be installed in %s." % os.path.join(opts.qscidir, "api", "python")) sipconfig.inform("The QScintilla .sip files will be installed in %s." % opts.qscisipdir) if opts.no_docstrings: sipconfig.inform("The QScintilla module is being built without generated docstrings.") else: sipconfig.inform("The QScintilla module is being built with generated docstrings.") if opts.prot_is_public: sipconfig.inform("The QScintilla module is being built with 'protected' redefined as 'public'.")
def main(argv): """Create the configuration module module. argv is the list of command line arguments. """ global pyqt # Check SIP is new enough. if "preview" not in pyqt.sip_version_str and "snapshot" not in pyqt.sip_version_str: if pyqt.sip_version < sip_min_version: sipconfig.error("This version of QScintilla requires SIP v%s or later" % sipconfig.version_to_string(sip_min_version)) # Parse the command line. global opts p = create_optparser() opts, args = p.parse_args() if args: p.print_help() sys.exit(2) # Provide defaults for platform-specific options. if sys.platform == 'win32': opts.prot_is_public = False if opts.not_dll: global qsci_define qsci_define = "" # Set the version of PyQt explicitly. global qt_data_dir if opts.pyqt_major == 4: if pyqt4 is None: sipconfig.error("PyQt v4 was specified with the -p argument but doesn't seem to be installed.") else: pyqt = pyqt4.Configuration() qt_data_dir = pyqt.qt_data_dir elif opts.pyqt_major == 3: if pyqt3 is None: sipconfig.error("PyQt v3 was specified with the -p argument but doesn't seem to be installed.") else: pyqt = pyqt3.Configuration() qt_data_dir = pyqt.qt_dir elif opts.pyqt_major >= 0: sipconfig.error("Specify either 3 or 4 with the -p argument.") # Now we know which version of PyQt to use we can set defaults for those # arguments that weren't specified. if opts.qscimoddir is None: opts.qscimoddir = pyqt.pyqt_mod_dir if opts.qsciincdir is None: opts.qsciincdir = pyqt.qt_inc_dir if opts.qscilibdir is None: opts.qscilibdir = pyqt.qt_lib_dir if opts.qscisipdir is None: opts.qscisipdir = pyqt.pyqt_sip_dir if opts.qscidir is None: opts.qscidir = os.path.join(qt_data_dir, "qsci") # Check for QScintilla. check_qscintilla() # Tell the user what's been found. inform_user() # Generate the code. generate_code()
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. ############################################################################ import os import glob import sipconfig import shutil import numpy import platform from checksipexc import checksipexc # get sip version str_version = sipconfig.version_to_string(sipconfig.Configuration().sip_version) versions = [int(x) for x in str_version.split('.')] major,minor = versions[0],versions[1] modules = [('core', ['common', 'hardware', 'control']), ('simulator', [os.path.join('camera','simulator')]), ('pco', [os.path.join('camera','pco')]), ('espia', [os.path.join('camera','common','espia')]), ('frelon', [os.path.join('camera','frelon')]), ('maxipix', [os.path.join('camera','maxipix')]), ('basler', [os.path.join('camera','basler')]), ('prosilica', [os.path.join('camera','prosilica')]), ('ueye', [os.path.join('camera','ueye')]), ('roperscientific', [os.path.join('camera','roperscientific')]), ('adsc', [os.path.join('camera','adsc')]), ('merlin', [os.path.join('camera','merlin')]),
def main(argv): """Create the configuration module module. argv is the list of command line arguments. """ try: optlist, args = getopt.getopt(argv[1:], "hcd:gj:kn:o:ruv:w") except getopt.GetoptError: usage() global opt_pyqmmpmoddir, opt_pyqmmpsipdir global opt_qmmpincdir, opt_qmmplibdir global opt_static, opt_debug, opt_concat, opt_releasegil, opt_split global opt_tracing, opt_verbose """ for opt, arg in optlist: if opt == "-h": usage(0) elif opt == "-c": opt_concat = 1 elif opt == "-d": opt_pyqmmpmoddir = arg elif opt == "-g": opt_releasegil = 1 elif opt == "-j": try: opt_split = int(arg) except: usage() elif opt == "-k": opt_static = 1 elif opt == "-n": opt_qmmpincdir = arg elif opt == "-o": opt_qmmplibdir = arg elif opt == "-r": opt_tracing = 1 elif opt == "-u": opt_debug = 1 elif opt == "-v": opt_pyqmmpsipdir = arg elif opt == "-w": opt_verbose = 1 if args: usage() """ # check_license() sipconfig.inform("SIP %s is being used." % pyqtcfg.sip_version_str) # Check SIP is new enough. if pyqtcfg.sip_version_str[:8] != "snapshot": minv = None if pyqtcfg.sip_version >= 0x040000: if pyqtcfg.sip_version < sip_min_v4_version: minv = sip_min_v4_version else: if pyqtcfg.sip_version < sip_min_v3_version: minv = sip_min_v3_version if minv: sipconfig.error("This version of PyQMMP requires SIP v%s or later" % sipconfig.version_to_string(minv)) # Check for . # check_qmmp() # If wasn't found then there is no point carrying on. An # appropriate error message will already have been displayed. # if qmmp_version is None: # sys.exit(1) # Set the SIP platform, version and feature flags. set_sip_flags() # Tell the user what's been found. inform_user() lib_dir = "../../" # if opt_qmmplibdir != "../lib": # lib_dir = opt_qmmplibdir # Generate the code. generate_code( "qmmp", imports=["PyQt4"], extra_define=qmmp_define, extra_include_dir=opt_qmmpincdir, extra_lib_dir=lib_dir, extra_lib="qmmp", sip_flags=qmmp_sip_flags, ) # Create the additional Makefiles. create_makefiles() # Install the configuration module. create_config("pyqmmpconfig.py", "pyqmmpconfig.py.in")
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. ############################################################################ import os import glob import sipconfig import shutil import numpy import platform from checksipexc import checksipexc # get sip version str_version = sipconfig.version_to_string( sipconfig.Configuration().sip_version) versions = [int(x) for x in str_version.split('.')] major, minor = versions[0], versions[1] modules = [ ('core', ['common', 'hardware', 'control']), ('simulator', [os.path.join('camera', 'simulator')]), ('pco', [os.path.join('camera', 'pco')]), ('espia', [os.path.join('camera', 'common', 'espia')]), ('frelon', [os.path.join('camera', 'frelon')]), ('maxipix', [os.path.join('camera', 'maxipix')]), ('basler', [os.path.join('camera', 'basler')]), ('prosilica', [os.path.join('camera', 'prosilica')]), ('ueye', [os.path.join('camera', 'ueye')]), ('roperscientific', [os.path.join('camera', 'roperscientific')]), ('adsc', [os.path.join('camera', 'adsc')]),
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. ############################################################################ import os import glob import sipconfig import shutil import numpy # get sip version sip_version = sipconfig.Configuration().sip_version str_version = sipconfig.version_to_string(sip_version) versions = [int(x) for x in str_version.split('.')] major, minor = versions[0], versions[1] src_file = ('gldisplay_before_4_12.sip' if major == 4 and minor < 12 else 'gldisplay.sip') shutil.copyfile(src_file, 'gldisplay_tmp.sip') exclude_sipfile = set() # The name of the SIP build file generated by SIP and used by the build # system. build_file = 'gldisplay.sbf' config = sipconfig.Configuration() # Platform
def main(argv): """Create the configuration module module. argv is the list of command line arguments. """ try: optlist, args = getopt.getopt(argv[1:], "hcd:gj:kn:o:ruv:w:q") except getopt.GetoptError: usage() global opt_pyqicstablemoddir, opt_pyqicstablesipdir global opt_qicstableincdir, opt_qicstablelibdir global opt_static, opt_debug, opt_concat, opt_releasegil, opt_split global opt_tracing, opt_verbose, opt_qicsTableDebug for opt, arg in optlist: if opt == "-h": usage(0) elif opt == "-c": opt_concat = 1 elif opt == "-d": opt_pyqicstablemoddir = arg elif opt == "-g": opt_releasegil = 1 elif opt == "-j": try: opt_split = int(arg) except: usage() elif opt == "-k": opt_static = 1 elif opt == "-n": opt_qicstableincdir = arg elif opt == "-o": opt_qicstablelibdir = arg elif opt == "-r": opt_tracing = 1 elif opt == "-u": opt_debug = 1 elif opt == "-v": opt_pyqicstablesipdir = arg elif opt == "-w": opt_verbose = 1 elif opt == "-q": opt_qicsTableDebug = 1 if args: usage() check_license() sipconfig.inform("SIP %s is being used." % pyqtcfg.sip_version_str) # Check SIP is new enough. if pyqtcfg.sip_version_str[:8] != "snapshot": minv = None if pyqtcfg.sip_version >= 0x040000: if pyqtcfg.sip_version < sip_min_v4_version: minv = sip_min_v4_version else: if pyqtcfg.sip_version < sip_min_v3_version: minv = sip_min_v3_version if minv: sipconfig.error( "This version of PyQicsTable requires SIP v%s or later" % sipconfig.version_to_string(minv)) # Check for QicsTable. check_qicstable() # If QicsTable wasn't found then there is no point carrying on. An # appropriate error message will already have been displayed. if qicstable_version is None: sys.exit(1) # Set the SIP platform, version and feature flags. set_sip_flags() # Tell the user what's been found. inform_user() lib_dir = "../../../lib" if opt_qicstablelibdir != "../../lib": lib_dir = opt_qicstablelibdir # Generate the code. libName = None if os.name == "nt": if opt_qicsTableDebug == 1: libName = "qicstabled2" else: libName = "qicstable2" else: if opt_qicsTableDebug == 1: libName = "qicstable_debug" else: libName = "qicstable" generate_code("qicstable", imports=["PyQt4"], extra_define=qicstable_define, extra_include_dir=opt_qicstableincdir, extra_lib_dir=lib_dir, extra_lib=libName, sip_flags=qicstable_sip_flags) # Create the additional Makefiles. create_makefiles() # Install the configuration module. create_config("pyqicstableconfig.py", "pyqicstableconfig.py.in")
def main(argv): """Create the configuration module module. argv is the list of command line arguments. """ global pyqt # Check SIP is new enough. if "snapshot" not in pyqt.sip_version_str: if pyqt.sip_version < sip_min_version: sipconfig.error("This version of Fresh requires SIP v%s or later" % sipconfig.version_to_string(sip_min_version)) # Parse the command line. global opts p = create_optparser() opts, args = p.parse_args() if args: p.print_help() sys.exit(2) if opts.not_dll: global fresh_define fresh_define = "" # Set the version of PyQt explicitly. global qt_data_dir if pyqt4 is None: sipconfig.error("PyQt v4 was specified with the -p argument but doesn't seem to be installed.") else: pyqt = pyqt4.Configuration() qt_data_dir = pyqt.qt_data_dir # Now we know which version of PyQt to use we can set defaults for those # arguments that weren't specified. if opts.freshmoddir is None: opts.freshmoddir = pyqt.pyqt_mod_dir if not os.path.exists(opts.freshmoddir): print 'Invalid PyQt4 installation path in the PyQt4.pyqtconfig. Trying to detect automatically' import PyQt4 opts.freshmoddir = os.path.dirname(PyQt4.__file__) if os.path.exists(opts.freshmoddir): print 'Detected' else: sipconfig.error("PyQt installation path not detected") if opts.freshincdir is None: opts.freshincdir = pyqt.qt_inc_dir if opts.freshlibdir is None: opts.freshlibdir = pyqt.qt_lib_dir if opts.freshsipdir is None: opts.freshsipdir = pyqt.pyqt_sip_dir if opts.freshdir is None: opts.freshdir = os.path.join(qt_data_dir, "fresh") """ # Check for Fresh. check_qscintilla() """ # Tell the user what's been found. inform_user() # Generate the code. generate_code()