Commit 71751276 authored by Martin's avatar Martin

update distutils patch

parent d08d04a1
......@@ -2,64 +2,95 @@ Description: Remove unnecessary use of distutils
Author: W. Martin Borgert <debacle@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/893694
Last-Update: 2018-04-01
Last-Update: 2018-08-21
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/gajim/gajim.py
+++ b/gajim/gajim.py
@@ -143,20 +143,6 @@
print('Gajim needs python-nbxmpp to run. Quitting…')
sys.exit(1)
@@ -24,7 +24,6 @@
import platform
from ctypes import CDLL, byref, create_string_buffer
from ctypes.util import find_library
-from distutils.version import LooseVersion as V
# Install _() in namespace
from gajim.common import i18n
@@ -33,20 +32,6 @@
_MIN_GTK_VER = "3.22.0"
- from distutils.version import LooseVersion as V
- if V(nbxmpp.__version__) < V(MIN_NBXMPP_VER):
- print('Gajim needs python-nbxmpp >= %s to run. '
- 'Quitting...' % MIN_NBXMPP_VER)
- sys.exit(1)
-def _check_required_deps():
- try:
- import nbxmpp
- except ImportError:
- print('Gajim needs python-nbxmpp to run. Quitting…')
- sys.exit(1)
-
- from distutils.version import LooseVersion as V
- if V(nbxmpp.__version__) < V(_MIN_NBXMPP_VER):
- print('Gajim needs python-nbxmpp >= %s to run. '
- 'Quitting...' % _MIN_NBXMPP_VER)
- sys.exit(1)
-
-
- gtk_ver = '%s.%s.%s' % (Gtk.get_major_version(),
- Gtk.get_minor_version(),
- Gtk.get_micro_version())
- if V(gtk_ver) < V(MIN_GTK_VER):
- print('Gajim needs GTK+ >= %s to run. '
- 'Quitting...' % MIN_GTK_VER)
- sys.exit(1)
def _init_gui(gui):
if gui == 'GTK':
_init_gtk()
@@ -61,15 +46,6 @@
gi.require_version('GObject', '2.0')
gi.require_version('Pango', '1.0')
- from gi.repository import Gtk
- gtk_ver = '%s.%s.%s' % (Gtk.get_major_version(),
- Gtk.get_minor_version(),
- Gtk.get_micro_version())
- if V(gtk_ver) < V(_MIN_GTK_VER):
- print('Gajim needs GTK+ >= %s to run. '
- 'Quitting...' % _MIN_GTK_VER)
- sys.exit(1)
-
# Create and initialize Application Paths & Databases
from gajim.common import configpaths
configpaths.gajimpaths.init(
from gajim import gtkexcepthook
gtkexcepthook.init()
@@ -116,6 +92,5 @@
if os.geteuid() == 0:
sys.exit("You must not launch gajim as root, it is insecure.")
- _check_required_deps()
_set_proc_title()
_init_gui('GTK')
--- a/gajim/common/app.py
+++ b/gajim/common/app.py
@@ -32,7 +32,6 @@
import sys
import logging
import locale
import uuid
-from distutils.version import LooseVersion as V
from collections import namedtuple
import gi
import nbxmpp
@@ -180,10 +179,6 @@
on a much lower version number than gnupg
Also we need at least python-gnupg 0.3.8
'''
- v_gnupg = gnupg.__version__
- if V(v_gnupg) < V('0.3.8') or V(v_gnupg) > V('1.0.0'):
- glog.info('Gajim needs python-gnupg >= 0.3.8')
- HAVE_GPG = False
except ImportError:
HAVE_GPG = False
else:
@@ -201,10 +200,6 @@
on a much lower version number than gnupg
Also we need at least python-gnupg 0.3.8
'''
- v_gnupg = gnupg.__version__
- if V(v_gnupg) < V('0.3.8') or V(v_gnupg) > V('1.0.0'):
- log('gajim').info('Gajim needs python-gnupg >= 0.3.8')
- raise ImportError
_dependencies['PYGPG'] = True
except ImportError:
pass
--- a/gajim/common/helpers.py
+++ b/gajim/common/helpers.py
@@ -44,7 +44,6 @@
import socket
import time
from datetime import datetime, timedelta, timezone, tzinfo
from datetime import datetime, timedelta
-from distutils.version import LooseVersion as V
from encodings.punycode import punycode_encode
from string import Template
@@ -1593,11 +1592,6 @@
@@ -1472,11 +1471,6 @@
return _get_img_proxy(attrs, proxy)
return _get_img_direct(attrs)
......@@ -70,14 +101,4 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-
def get_available_emoticon_themes():
emoticons_themes = []
emoticons_data_path = os.path.join(app.DATA_DIR, 'emoticons')
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -63,7 +63,6 @@
from gajim.common import exceptions
from gajim.common import check_X509
from gajim.common.connection_handlers import *
-from gajim.common.helpers import version_condition
from gajim.common.contacts import GC_Contact
from gajim.gtkgui_helpers import get_action
if sys.platform not in ('win32', 'darwin'):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment