"Fossies" - the Fresh Open Source Software Archive

Member "sk1-2.0rc4/dependencies.py" (25 May 2019, 4972 Bytes) of package /linux/misc/sk1-2.0rc4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "dependencies.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.0rc3_vs_2.0rc4.

    1 # -*- coding: utf-8 -*-
    2 #
    3 #   Setup dependencies module
    4 #
    5 #   Copyright (C) 2016-2018 by Igor E. Novikov
    6 #
    7 #   This program is free software: you can redistribute it and/or modify
    8 #   it under the terms of the GNU General Public License as published by
    9 #   the Free Software Foundation, either version 3 of the License, or
   10 #   (at your option) any later version.
   11 #
   12 #   This program is distributed in the hope that it will be useful,
   13 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
   14 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15 #   GNU General Public License for more details.
   16 #
   17 #   You should have received a copy of the GNU General Public License
   18 #   along with this program.  If not, see <https://www.gnu.org/licenses/>.
   19 
   20 from utils.dist import *
   21 
   22 DEB_GENERIC = 'liblcms2-2 (>=2.0), python (>=2.4), python (<<3.0), '
   23 DEB_GENERIC += 'python-cairo, python-reportlab, '
   24 
   25 UC2_DEB_DEPENDENCIES = {
   26     UBUNTU14: DEB_GENERIC + 'libmagickwand5, python-pil',
   27     UBUNTU15: DEB_GENERIC + 'libmagickwand5, python-pil',
   28     UBUNTU16: DEB_GENERIC + 'libmagickwand-6.q16-2, python-pil',
   29     UBUNTU17: DEB_GENERIC + 'libmagickwand-6.q16-3, python-pil',
   30     UBUNTU18: DEB_GENERIC + 'libmagickwand-6.q16-3, python-pil'
   31         # Workaround for Ubuntu 18.10
   32         if platform.dist()[1] != '18.10' else
   33         DEB_GENERIC + 'libmagickwand-6.q16-6, python-pil',
   34 
   35     MINT17: DEB_GENERIC + 'libmagickwand5, python-pil',
   36     MINT18: DEB_GENERIC + 'libmagickwand-6.q16-2, python-pil',
   37     MINT19: DEB_GENERIC + 'libmagickwand-6.q16-3, python-pil',
   38 
   39     DEBIAN7: DEB_GENERIC + 'libmagickwand5, python-imaging',
   40     DEBIAN8: DEB_GENERIC + 'libmagickwand-6.q16-2, python-pil',
   41     DEBIAN9: DEB_GENERIC + 'libmagickwand-6.q16-3, python-pil',
   42 }
   43 
   44 SK1_DEB_DEPENDENCIES = {
   45     UBUNTU14: 'python-wxgtk2.8, python-cups',
   46     UBUNTU15: 'python-wxgtk2.8, python-cups',
   47     UBUNTU16: 'python-wxgtk3.0, python-cups',
   48     UBUNTU17: 'python-wxgtk3.0, python-cups',
   49     UBUNTU18: 'python-wxgtk3.0, python-cups',
   50 
   51     MINT17: 'python-wxgtk2.8, python-cups',
   52     MINT18: 'python-wxgtk3.0, python-cups',
   53     MINT19: 'python-wxgtk3.0, python-cups',
   54 
   55     DEBIAN7: 'python-wxgtk2.8, python-cups',
   56     DEBIAN8: 'python-wxgtk3.0, python-cups',
   57     DEBIAN9: 'python-wxgtk3.0, python-cups',
   58 }
   59 
   60 UC2_RPM_DEPENDENCIES = {
   61     FEDORA23: 'lcms2 pango ImageMagick pycairo python-pillow python-reportlab',
   62     FEDORA24: 'lcms2 pango ImageMagick pycairo python-pillow python2-reportlab',
   63     FEDORA25: 'lcms2 pango ImageMagick pycairo python2-pillow python2-reportlab',
   64     FEDORA26: 'lcms2 pango ImageMagick pycairo python2-pillow python2-reportlab',
   65     FEDORA27: 'lcms2 pango ImageMagick pycairo python2-pillow python2-reportlab',
   66     FEDORA28: 'lcms2 pango ImageMagick python2-cairo python2-pillow python2-reportlab',
   67     FEDORA29: 'lcms2 pango ImageMagick python2-cairo python2-pillow python2-reportlab',
   68 
   69     OPENSUSE13: 'liblcms2-2 libpango-1_0-0 ImageMagick python-cairo '
   70                 'python-Pillow python-reportlab',
   71     OPENSUSE42: 'liblcms2-2 libpango-1_0-0 ImageMagick python-cairo '
   72                 'python-Pillow python-reportlab',
   73     OPENSUSE42_2: 'liblcms2-2 libpango-1_0-0 ImageMagick python-cairo '
   74                   'python-Pillow python-reportlab',
   75     OPENSUSE42_3: 'liblcms2-2 libpango-1_0-0 ImageMagick python-cairo '
   76                   'python-Pillow python-reportlab',
   77     OPENSUSE15_0: 'liblcms2-2 libpango-1_0-0 ImageMagick python-cairo '
   78                   'python-Pillow python-reportlab',
   79 }
   80 
   81 SK1_RPM_DEPENDENCIES = {
   82     FEDORA23: 'wxPython python-cups',
   83     FEDORA24: 'wxPython python2-cups',
   84     FEDORA25: 'wxPython python2-cups',
   85     FEDORA26: 'wxPython python2-cups',
   86     FEDORA27: 'wxPython python2-cups',
   87     FEDORA28: 'python2-wxpython python2-cups',
   88     FEDORA29: 'python2-wxpython python2-cups',
   89 
   90     OPENSUSE13: 'python-wxWidgets python-cups',
   91     OPENSUSE42: 'python-wxWidgets python-cups',
   92     OPENSUSE42_2: 'python-wxWidgets python-cups',
   93     OPENSUSE42_3: 'python-wxWidgets python-cups',
   94     OPENSUSE15_0: 'python-wxWidgets python-cups',
   95 }
   96 
   97 
   98 def get_uc2_deb_depend():
   99     if SYSFACTS.sid in UC2_DEB_DEPENDENCIES:
  100         return UC2_DEB_DEPENDENCIES[SYSFACTS.sid]
  101     return ''
  102 
  103 
  104 def get_sk1_deb_depend():
  105     uc2_dep = get_uc2_deb_depend()
  106     sk1_dep = ''
  107     if SYSFACTS.sid in SK1_DEB_DEPENDENCIES:
  108         sk1_dep = SK1_DEB_DEPENDENCIES[SYSFACTS.sid]
  109     if uc2_dep and sk1_dep:
  110         sk1_dep = '%s, %s' % (uc2_dep, sk1_dep)
  111     elif uc2_dep:
  112         sk1_dep = uc2_dep
  113     return sk1_dep
  114 
  115 
  116 def get_uc2_rpm_depend():
  117     if SYSFACTS.sid in UC2_RPM_DEPENDENCIES:
  118         return UC2_RPM_DEPENDENCIES[SYSFACTS.sid]
  119     return ''
  120 
  121 
  122 def get_sk1_rpm_depend():
  123     uc2_dep = get_uc2_rpm_depend()
  124     sk1_dep = ''
  125     if SYSFACTS.sid in SK1_RPM_DEPENDENCIES:
  126         sk1_dep = SK1_RPM_DEPENDENCIES[SYSFACTS.sid]
  127     if uc2_dep and sk1_dep:
  128         sk1_dep = '%s %s' % (uc2_dep, sk1_dep)
  129     elif uc2_dep:
  130         sk1_dep = uc2_dep
  131     return sk1_dep