no need to install gir webkit anymore

This commit is contained in:
j 2016-01-17 12:05:08 +05:30
parent 78c62d813e
commit a76766adab

18
install
View file

@ -47,17 +47,6 @@ class Install(Thread):
except: except:
apt_packages += ' python3.4 python3-pil python3-lxml' apt_packages += ' python3.4 python3-pil python3-lxml'
dnf_packages += ' python3-pillow python3-lxml' dnf_packages += ' python3-pillow python3-lxml'
version = '4.0'
distro = platform.linux_distribution()
if distro[0] == 'Ubuntu' and distro[1] <= '14.04':
version = '3.0'
try:
import gi
gi.require_version('WebKit2', version)
from gi.repository import WebKit2, Gtk
except:
apt_packages += ' gir1.2-webkit2-' + version
dnf_packages += ' webkitgtk4'
try: try:
import OpenSSL import OpenSSL
from OpenSSL.SSL import TLSv1_2_METHOD from OpenSSL.SSL import TLSv1_2_METHOD
@ -73,15 +62,16 @@ class Install(Thread):
if not has_bin('pdftocairo'): if not has_bin('pdftocairo'):
apt_packages += ' poppler-utils' apt_packages += ' poppler-utils'
dnf_packages += ' poppler-utils' dnf_packages += ' poppler-utils'
apt_packages = apt_packages.strip()
dnf_packages = dnf_packages.strip()
if has_bin('apt-get') and apt_packages: if has_bin('apt-get') and apt_packages:
print('You need additional packages: %s' % apt_packages) print('You need additional packages: %s' % apt_packages)
print('run: sudo apt-get install -y ' + apt_packages) print('run: sudo apt-get install ' + apt_packages)
self.failed = True self.failed = True
return return
elif has_bin('dnf') and dnf_packages: elif has_bin('dnf') and dnf_packages:
print('Installing additional packages: %s' % dnf_packages) print('Installing additional packages: %s' % dnf_packages)
print('run: sudo dnf install -y ' + dnf_packages) print('run: sudo dnf install ' + dnf_packages)
self.failed = True self.failed = True
return return
elif apt_packages: elif apt_packages: