use dnf on fedora, install webkit2 if needed
This commit is contained in:
parent
3119f2b5a9
commit
c717a135af
1 changed files with 13 additions and 6 deletions
19
install
19
install
|
@ -51,26 +51,33 @@ class Install(Thread):
|
||||||
self.status['installing'] = 'setup'
|
self.status['installing'] = 'setup'
|
||||||
if sys.platform.startswith('linux'):
|
if sys.platform.startswith('linux'):
|
||||||
apt_packages = ''
|
apt_packages = ''
|
||||||
yum_packages = ''
|
dnf_packages = ''
|
||||||
try:
|
try:
|
||||||
import Image
|
import Image
|
||||||
import simplejson
|
import simplejson
|
||||||
import lxml
|
import lxml
|
||||||
except:
|
except:
|
||||||
apt_packages += ' python3.4 python3-pil python-simplejson python3-lxml'
|
apt_packages += ' python3.4 python3-pil python-simplejson python3-lxml'
|
||||||
yum_packages += ' python3-pil python3-simplejson python3-lxml'
|
dnf_packages += ' python3-pillow python3-simplejson python3-lxml'
|
||||||
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('WebKit2', '4.0')
|
||||||
|
from gi.repository import WebKit2, Gtk
|
||||||
|
except:
|
||||||
|
apt_packages += ' gir1.2-webkit2-4.0'
|
||||||
|
dnf_packages += ' webkitgtk4'
|
||||||
if not has_bin('pdftocairo'):
|
if not has_bin('pdftocairo'):
|
||||||
apt_packages += ' poppler-utils'
|
apt_packages += ' poppler-utils'
|
||||||
yum_packages += ' poppler-utils'
|
dnf_packages += ' poppler-utils'
|
||||||
if not os.path.exists('/usr/sbin/miredo'):
|
if not os.path.exists('/usr/sbin/miredo'):
|
||||||
apt_packages += ' miredo'
|
apt_packages += ' miredo'
|
||||||
|
|
||||||
if has_bin('apt-get') and apt_packages:
|
if has_bin('apt-get') and apt_packages:
|
||||||
print('Installing additional packages: %s' % apt_packages)
|
print('Installing additional packages: %s' % apt_packages)
|
||||||
os.system('sudo apt-get install -y ' + apt_packages)
|
os.system('sudo apt-get install -y ' + apt_packages)
|
||||||
elif has_bin('yum') and yum_packages:
|
elif has_bin('dnf') and dnf_packages:
|
||||||
print('Installing additional packages: %s' % yum_packages)
|
print('Installing additional packages: %s' % dnf_packages)
|
||||||
os.system('sudo yum install ' + yum_packages)
|
os.system('sudo dnf install ' + dnf_packages)
|
||||||
else:
|
else:
|
||||||
print('You need to install Pillow, simplejson and lxml\ni.e. sudo pip3 install pillow simplejson lxml')
|
print('You need to install Pillow, simplejson and lxml\ni.e. sudo pip3 install pillow simplejson lxml')
|
||||||
if 'poppler' in apt_packages:
|
if 'poppler' in apt_packages:
|
||||||
|
|
Loading…
Reference in a new issue