"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libscidavis/python-sipcmd.py" between
scidavis-1.26.tar.gz and scidavis-2.1.4.tar.gz

About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).

python-sipcmd.py  (scidavis-1.26):python-sipcmd.py  (scidavis-2.1.4)
skipping to change at line 28 skipping to change at line 28
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. # # GNU General Public License for more details. #
# # # #
# You should have received a copy of the GNU General Public License # # You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the Free Software # # along with this program; if not, write to the Free Software #
# Foundation, Inc., 51 Franklin Street, Fifth Floor, # # Foundation, Inc., 51 Franklin Street, Fifth Floor, #
# Boston, MA 02110-1301 USA # # Boston, MA 02110-1301 USA #
# # # #
############################################################################ ############################################################################
import os
import warnings
import sys, sipconfig import sys, sipconfig
config = sipconfig.Configuration() config = sipconfig.Configuration()
try: try:
pyqt = sys.argv[1] pyqt = sys.argv[1]
except IndexError: except IndexError:
pyqt = 'PyQt4' pyqt = 'PyQt5'
if (pyqt not in ['PyQt4','PyQt5']): if (pyqt not in ['PyQt4','PyQt5']):
pyqt = 'PyQt4' pyqt = 'PyQt5'
try: try:
exec("from "+pyqt+".QtCore import PYQT_CONFIGURATION") exec("from "+pyqt+".QtCore import PYQT_CONFIGURATION")
except ImportError: except ImportError:
pass pass
sipBin = config.sip_bin sipBin = config.sip_bin
sipDir = config.default_sip_dir+'/'+pyqt sipDir = config.default_sip_dir+'/'+pyqt
if not os.path.exists(sipDir):
if sys.version_info[0] >= 3 and sys.version_info[1] >= 8 and pyqt == 'PyQt5'
:
from importlib.metadata import distribution
dist = distribution(pyqt)
sip = [p for p in dist.files if p.name == 'QtCoremod.sip']
assert len(sip) == 1
sipDir = str(dist.locate_file(sip[0]).parent.parent)
else:
warnings.warn('sipDir does not exists, %s' % sipDir)
sipFlags = PYQT_CONFIGURATION['sip_flags'] sipFlags = PYQT_CONFIGURATION['sip_flags']
flags = ["-I ../scidavis"] flags = ["-I ../scidavis"]
if config.sip_version >= 0x040a00: if config.sip_version >= 0x040a00:
# make use of docstring generation feature in SIP >= 4.10 # make use of docstring generation feature in SIP >= 4.10
flags.append("-o") flags.append("-o")
sys.stdout.write(" ".join([sipBin, '-I', sipDir, sipFlags]+flags)) sys.stdout.write(" ".join([sipBin, '-I', sipDir, sipFlags]+flags))
 End of changes. 4 change blocks. 
2 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)