Wed, 04 Jun 2014 16:51:04 +0200
Added code to prevent possible segfaults when closing down.
Utilities/__init__.py | file | annotate | diff | comparison | revisions | |
eric5.py | file | annotate | diff | comparison | revisions | |
eric5_webbrowser.py | file | annotate | diff | comparison | revisions | |
install.py | file | annotate | diff | comparison | revisions |
--- a/Utilities/__init__.py Sun Jun 01 16:30:26 2014 +0200 +++ b/Utilities/__init__.py Wed Jun 04 16:51:04 2014 +0200 @@ -1589,9 +1589,9 @@ @return string with version infos (string) """ try: - import sipconfig - sip_version_str = sipconfig.Configuration().sip_version_str - except ImportError: + import sip + sip_version_str = sip.SIP_VERSION_STR + except (ImportError, AttributeError): sip_version_str = "sip version not available" info = "Version Numbers:{0} Python {1}{2}".format(
--- a/eric5.py Sun Jun 01 16:30:26 2014 +0200 +++ b/eric5.py Wed Jun 04 16:51:04 2014 +0200 @@ -24,6 +24,13 @@ import io # __IGNORE_WARNING__ basestring = str +import sip +try: + sip.setdestroyonexit(False) +except AttributeError: + pass + + import sys import os import traceback
--- a/eric5_webbrowser.py Sun Jun 01 16:30:26 2014 +0200 +++ b/eric5_webbrowser.py Wed Jun 04 16:51:04 2014 +0200 @@ -21,6 +21,11 @@ except (ImportError): pass +try: + sip.setdestroyonexit(False) +except AttributeError: + pass + import sys import os
--- a/install.py Sun Jun 01 16:30:26 2014 +0200 +++ b/install.py Wed Jun 04 16:51:04 2014 +0200 @@ -994,10 +994,21 @@ # check version of sip try: - import sipconfig - sipVersion = sipconfig.Configuration().sip_version_str + import sip + sipVersion = sip.SIP_VERSION_STR # always assume, that snapshots are new enough if "snapshot" not in sipVersion: + while sipVersion.count('.') < 2: + sipVersion += '.0' + (maj, min, pat) = sipVersion.split('.') + maj = int(maj) + min = int(min) + pat = int(pat) + if maj < 4 or (maj == 4 and min < 14) or \ + (maj == 4 and min == 14 and pat < 2): + print('Sorry, you must have sip 4.14.2 or higher or' + ' a recent snapshot release.') + exit(3) # check for blacklisted versions for vers in BlackLists["sip"] + PlatformBlackLists["sip"]: if vers == sipVersion: @@ -1006,7 +1017,7 @@ .format(vers)) print('Please install another version.') exit(3) - except ImportError: + except (ImportError, AttributeError): pass # check version of PyQt