1# -*- coding: utf-8 -*- 2# 3# Copyright (c) 2012, Larry Shaffer <larry@dakotacarto.com> 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are met: 8# * Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# * Redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in the 12# documentation and/or other materials provided with the distribution. 13# * Neither the name of the Larry Shaffer <larry@dakotacarto.com> nor the 14# names of its contributors may be used to endorse or promote products 15# derived from this software without specific prior written permission. 16# 17# THIS SOFTWARE IS PROVIDED BY Larry Shaffer <larry@dakotacarto.com> ''AS IS'' AND ANY 18# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20# DISCLAIMED. IN NO EVENT SHALL Larry Shaffer <larry@dakotacarto.com> BE LIABLE FOR ANY 21# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27# 28"""Find QScintilla2 PyQt4/PyQt5 module version. 29 30.. note:: Redistribution and use is allowed according to the terms of the BSD 31license. For details see the accompanying COPYING-CMAKE-SCRIPTS file. 32""" 33__author__ = 'Larry Shaffer (larry@dakotacarto.com)' 34__date__ = '22/10/2012' 35__copyright__ = 'Copyright 2012, The QGIS Project' 36 37import sys 38 39VER = "" 40if len(sys.argv) > 0: 41 if sys.argv[1] == "4": 42 from PyQt4.Qsci import QSCINTILLA_VERSION_STR 43 VER = QSCINTILLA_VERSION_STR 44 else: 45 from PyQt5.Qsci import QSCINTILLA_VERSION_STR 46 VER = QSCINTILLA_VERSION_STR 47else: 48 try: 49 from PyQt4.Qsci import QSCINTILLA_VERSION_STR 50 VER = QSCINTILLA_VERSION_STR 51 except ImportError: 52 try: 53 from PyQt5.Qsci import QSCINTILLA_VERSION_STR 54 VER = QSCINTILLA_VERSION_STR 55 except ImportError: 56 pass 57 58print("qsci_version_str:%s" % VER) 59