From 5e99dfd822b8cac8688c005dbfbef20b5581b634 Mon Sep 17 00:00:00 2001
From: Marko Petric <marko.petric@cern.ch>
Date: Mon, 9 Sep 2019 18:00:48 +0200
Subject: [PATCH] replace usage of six with version shipped with dd4hep

---
 DDCore/python/dd4hepFactories.py                           | 2 +-
 DDCore/python/lcdd.py                                      | 2 +-
 DDG4/python/DDG4.py                                        | 2 +-
 DDG4/python/DDSim/DD4hepSimulation.py                      | 2 +-
 DDG4/python/DDSim/Helper/Action.py                         | 4 ++--
 DDG4/python/DDSim/Helper/ConfigHelper.py                   | 2 +-
 DDG4/python/DDSim/Helper/Filter.py                         | 4 ++--
 DDG4/python/DDSim/Helper/Gun.py                            | 2 +-
 DDG4/python/DDSim/Helper/Input.py                          | 2 +-
 DDG4/python/DDSim/Helper/Meta.py                           | 2 +-
 DDG4/python/DDSim/Helper/Physics.py                        | 2 +-
 GaudiPluginService/python/GaudiPluginService/cpluginsvc.py | 2 +-
 examples/AlignDet/drivers/Shelf.py                         | 2 +-
 examples/CLICSiD/scripts/CLICRandom.py                     | 2 +-
 examples/ClientTests/scripts/MultiCollections.py           | 2 +-
 examples/ClientTests/scripts/MultiSegmentCollections.py    | 2 +-
 examples/DDCMS/scripts/CMSTrackerSim.py                    | 2 +-
 examples/LHeD/scripts/LHeDRandom.py                        | 2 +-
 18 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/DDCore/python/dd4hepFactories.py b/DDCore/python/dd4hepFactories.py
index cba990e63..2a1a4650c 100755
--- a/DDCore/python/dd4hepFactories.py
+++ b/DDCore/python/dd4hepFactories.py
@@ -15,7 +15,7 @@ import os
 import sys
 import optparse
 import logging
-from six.moves import input
+from ddsix.moves import input
 from io import open
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
diff --git a/DDCore/python/lcdd.py b/DDCore/python/lcdd.py
index 915c6db45..921a5cfe7 100644
--- a/DDCore/python/lcdd.py
+++ b/DDCore/python/lcdd.py
@@ -17,7 +17,7 @@ from functools import partial
 import SystemOfUnits
 import math
 import logging
-from six.moves import range
+from ddsix.moves import range
 from io import open
 from ROOT import SetOwnership, dd4hep, TGeoMixture, TGeoMedium, gGeoManager, TNamed
 
diff --git a/DDG4/python/DDG4.py b/DDG4/python/DDG4.py
index 3a24c81ec..783addf6b 100644
--- a/DDG4/python/DDG4.py
+++ b/DDG4/python/DDG4.py
@@ -13,7 +13,7 @@ import g4units as G4Units
 from dd4hep_base import std, std_vector, std_list, std_map, std_pair
 import logging
 from dd4hep_base import *
-import six
+import ddsix as six
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
 logger = logging.getLogger(__name__)
diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py
index b3b577a59..f39ed08f8 100644
--- a/DDG4/python/DDSim/DD4hepSimulation.py
+++ b/DDG4/python/DDSim/DD4hepSimulation.py
@@ -23,7 +23,7 @@ from DDSim.Helper.MagneticField import MagneticField
 from DDSim.Helper.ParticleHandler import ParticleHandler
 from DDSim.Helper.Gun import Gun
 import argparse
-import six
+import ddsix as six
 from g4units import *
 import logging
 from io import open
diff --git a/DDG4/python/DDSim/Helper/Action.py b/DDG4/python/DDSim/Helper/Action.py
index 5418770cc..afa52ad3d 100644
--- a/DDG4/python/DDSim/Helper/Action.py
+++ b/DDG4/python/DDSim/Helper/Action.py
@@ -3,8 +3,8 @@
 
 from __future__ import absolute_import, unicode_literals
 from DDSim.Helper.ConfigHelper import ConfigHelper
-from six.moves import range
-import six
+from ddsix.moves import range
+import ddsix as six
 
 
 class Action(ConfigHelper):
diff --git a/DDG4/python/DDSim/Helper/ConfigHelper.py b/DDG4/python/DDSim/Helper/ConfigHelper.py
index 253fba6c0..179a84f46 100644
--- a/DDG4/python/DDSim/Helper/ConfigHelper.py
+++ b/DDG4/python/DDSim/Helper/ConfigHelper.py
@@ -14,7 +14,7 @@ call for the parser object create an additional member::
 
 from __future__ import absolute_import, unicode_literals
 from pprint import pprint
-import six
+import ddsix as six
 
 
 class ConfigHelper(object):
diff --git a/DDG4/python/DDSim/Helper/Filter.py b/DDG4/python/DDSim/Helper/Filter.py
index 0c027f620..2bedf7fb2 100644
--- a/DDG4/python/DDSim/Helper/Filter.py
+++ b/DDG4/python/DDSim/Helper/Filter.py
@@ -9,8 +9,8 @@ from __future__ import absolute_import, unicode_literals
 from DDSim.Helper.ConfigHelper import ConfigHelper
 from g4units import keV
 import logging
-from six.moves import range
-import six
+from ddsix.moves import range
+import ddsix as six
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
 logger = logging.getLogger(__name__)
diff --git a/DDG4/python/DDSim/Helper/Gun.py b/DDG4/python/DDSim/Helper/Gun.py
index ff3baf5b1..fe71b1edf 100644
--- a/DDG4/python/DDSim/Helper/Gun.py
+++ b/DDG4/python/DDSim/Helper/Gun.py
@@ -4,7 +4,7 @@ from __future__ import absolute_import, unicode_literals
 from DDSim.Helper.ConfigHelper import ConfigHelper
 from g4units import GeV
 import logging
-import six
+import ddsix as six
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
 logger = logging.getLogger(__name__)
diff --git a/DDG4/python/DDSim/Helper/Input.py b/DDG4/python/DDSim/Helper/Input.py
index 89294546d..5b4e23885 100644
--- a/DDG4/python/DDSim/Helper/Input.py
+++ b/DDG4/python/DDSim/Helper/Input.py
@@ -2,7 +2,7 @@
 
 from __future__ import absolute_import, unicode_literals
 from DDSim.Helper.ConfigHelper import ConfigHelper
-import six
+import ddsix as six
 
 
 class Input(ConfigHelper):
diff --git a/DDG4/python/DDSim/Helper/Meta.py b/DDG4/python/DDSim/Helper/Meta.py
index f1091b1eb..2599d6c33 100644
--- a/DDG4/python/DDSim/Helper/Meta.py
+++ b/DDG4/python/DDSim/Helper/Meta.py
@@ -5,7 +5,7 @@ from DDSim.Helper.ConfigHelper import ConfigHelper
 import datetime
 import os
 import logging
-import six
+import ddsix as six
 from io import open
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
diff --git a/DDG4/python/DDSim/Helper/Physics.py b/DDG4/python/DDSim/Helper/Physics.py
index a7eb4589d..740ffc90a 100644
--- a/DDG4/python/DDSim/Helper/Physics.py
+++ b/DDG4/python/DDSim/Helper/Physics.py
@@ -5,7 +5,7 @@ import os
 
 from DDSim.Helper.ConfigHelper import ConfigHelper
 from g4units import mm
-import six
+import ddsix as six
 
 
 class Physics(ConfigHelper):
diff --git a/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py b/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py
index 923646f84..97716ce43 100644
--- a/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py
+++ b/GaudiPluginService/python/GaudiPluginService/cpluginsvc.py
@@ -1,6 +1,6 @@
 # cpluginsvc is a ctypes-based wrapper for the C-exposed API of GaudiPluginService
 from __future__ import absolute_import, unicode_literals, print_function
-from six.moves import range
+from ddsix.moves import range
 __doc__ = '''
 cpluginsvc is a ctypes-based wrapper for the C-API of the GaudiPluginService.
 
diff --git a/examples/AlignDet/drivers/Shelf.py b/examples/AlignDet/drivers/Shelf.py
index e6a1cdc98..50955d7a4 100644
--- a/examples/AlignDet/drivers/Shelf.py
+++ b/examples/AlignDet/drivers/Shelf.py
@@ -1,5 +1,5 @@
 from __future__ import absolute_import, unicode_literals
-from six.moves import range
+from ddsix.moves import range
 
 
 def detector_Shelf(description, det):
diff --git a/examples/CLICSiD/scripts/CLICRandom.py b/examples/CLICSiD/scripts/CLICRandom.py
index 95a69865e..7e69b3d59 100644
--- a/examples/CLICSiD/scripts/CLICRandom.py
+++ b/examples/CLICSiD/scripts/CLICRandom.py
@@ -10,7 +10,7 @@ from ROOT import TRandom
 from ROOT import gRandom
 
 import logging
-from six.moves import range
+from ddsix.moves import range
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
 logger = logging.getLogger(__name__)
diff --git a/examples/ClientTests/scripts/MultiCollections.py b/examples/ClientTests/scripts/MultiCollections.py
index 813439111..32d5298cf 100644
--- a/examples/ClientTests/scripts/MultiCollections.py
+++ b/examples/ClientTests/scripts/MultiCollections.py
@@ -5,7 +5,7 @@ import time
 import DDG4
 from DDG4 import OutputLevel as Output
 from SystemOfUnits import *
-from six.moves import range
+from ddsix.moves import range
 #
 #
 """
diff --git a/examples/ClientTests/scripts/MultiSegmentCollections.py b/examples/ClientTests/scripts/MultiSegmentCollections.py
index 7af8380d4..68edb8d20 100644
--- a/examples/ClientTests/scripts/MultiSegmentCollections.py
+++ b/examples/ClientTests/scripts/MultiSegmentCollections.py
@@ -5,7 +5,7 @@ import time
 import DDG4
 from DDG4 import OutputLevel as Output
 from SystemOfUnits import *
-from six.moves import range
+from ddsix.moves import range
 #
 #
 """
diff --git a/examples/DDCMS/scripts/CMSTrackerSim.py b/examples/DDCMS/scripts/CMSTrackerSim.py
index 1d09395be..9278fdd1f 100644
--- a/examples/DDCMS/scripts/CMSTrackerSim.py
+++ b/examples/DDCMS/scripts/CMSTrackerSim.py
@@ -6,7 +6,7 @@ import DDG4
 from DDG4 import OutputLevel as Output
 from SystemOfUnits import *
 import logging
-from six.moves import range
+from ddsix.moves import range
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
 logger = logging.getLogger(__name__)
diff --git a/examples/LHeD/scripts/LHeDRandom.py b/examples/LHeD/scripts/LHeDRandom.py
index 1b949397c..ca916c010 100644
--- a/examples/LHeD/scripts/LHeDRandom.py
+++ b/examples/LHeD/scripts/LHeDRandom.py
@@ -9,7 +9,7 @@ from __future__ import absolute_import, unicode_literals
 from ROOT import TRandom
 from ROOT import gRandom
 import logging
-from six.moves import range
+from ddsix.moves import range
 
 logging.basicConfig(format='%(levelname)s: %(message)s')
 logger = logging.getLogger(__name__)
-- 
GitLab