fix for demandimport
This commit is contained in:
parent
536ff02af8
commit
4cffef6be2
3 changed files with 13 additions and 19 deletions
|
@ -135,22 +135,22 @@ ZEROCONF_ACC_NAME = 'Local'
|
||||||
|
|
||||||
HAVE_ZEROCONF = True
|
HAVE_ZEROCONF = True
|
||||||
try:
|
try:
|
||||||
import avahi
|
__import__('avahi')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
import pybonjour
|
__import__('pybonjour')
|
||||||
except Exception: # Linux raises ImportError, Windows raises WindowsError
|
except Exception: # Linux raises ImportError, Windows raises WindowsError
|
||||||
HAVE_ZEROCONF = False
|
HAVE_ZEROCONF = False
|
||||||
|
|
||||||
HAVE_PYCRYPTO = True
|
HAVE_PYCRYPTO = True
|
||||||
try:
|
try:
|
||||||
import Crypto
|
__import__('Crypto')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAVE_PYCRYPTO = False
|
HAVE_PYCRYPTO = False
|
||||||
|
|
||||||
HAVE_GPG = True
|
HAVE_GPG = True
|
||||||
try:
|
try:
|
||||||
import gnupg
|
__import__('gnupg', globals(), locals(), [], -1)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAVE_GPG = False
|
HAVE_GPG = False
|
||||||
else:
|
else:
|
||||||
|
@ -164,7 +164,8 @@ HAVE_LATEX = False
|
||||||
|
|
||||||
HAVE_FARSIGHT = True
|
HAVE_FARSIGHT = True
|
||||||
try:
|
try:
|
||||||
import farsight, gst
|
__import__('farsight')
|
||||||
|
__import__('gst')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAVE_FARSIGHT = False
|
HAVE_FARSIGHT = False
|
||||||
gajim_identity = {'type': 'pc', 'category': 'client', 'name': 'Gajim'}
|
gajim_identity = {'type': 'pc', 'category': 'client', 'name': 'Gajim'}
|
||||||
|
|
|
@ -165,14 +165,7 @@ class FeaturesWindow:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def zeroconf_available(self):
|
def zeroconf_available(self):
|
||||||
try:
|
return gajim.HAVE_ZEROCONF
|
||||||
import avahi
|
|
||||||
except Exception:
|
|
||||||
try:
|
|
||||||
import pybonjour
|
|
||||||
except Exception:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def dbus_available(self):
|
def dbus_available(self):
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
|
@ -193,7 +186,7 @@ class FeaturesWindow:
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
import gnome.ui
|
__import__('gnome.ui')
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -204,7 +197,7 @@ class FeaturesWindow:
|
||||||
if kwalletbinding.kwallet_available():
|
if kwalletbinding.kwallet_available():
|
||||||
return True
|
return True
|
||||||
try:
|
try:
|
||||||
import gnomekeyring
|
__import__('gnomekeyring')
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -218,7 +211,7 @@ class FeaturesWindow:
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
import gtkspell
|
__import__('gtkspell')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -230,7 +223,7 @@ class FeaturesWindow:
|
||||||
if self.dbus_available() and dbus_support.get_notifications_interface():
|
if self.dbus_available() and dbus_support.get_notifications_interface():
|
||||||
return True
|
return True
|
||||||
try:
|
try:
|
||||||
import pynotify
|
__import__('pynotify')
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -248,7 +241,7 @@ class FeaturesWindow:
|
||||||
|
|
||||||
def docutils_available(self):
|
def docutils_available(self):
|
||||||
try:
|
try:
|
||||||
import docutils
|
__import__('docutils')
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -39,7 +39,7 @@ from common import demandimport
|
||||||
demandimport.enable()
|
demandimport.enable()
|
||||||
demandimport.ignore += ['gobject._gobject', 'libasyncns', 'i18n',
|
demandimport.ignore += ['gobject._gobject', 'libasyncns', 'i18n',
|
||||||
'logging.NullHandler', 'dbus.glib', 'dbus.service',
|
'logging.NullHandler', 'dbus.glib', 'dbus.service',
|
||||||
'command_system.implementation.standard']
|
'command_system.implementation.standard', 'OpenSSL.SSL', 'OpenSSL.crypto']
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
Loading…
Add table
Reference in a new issue