mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-05 15:00:33 +00:00
Import python six module only if python is 2.7
This commit is contained in:
parent
0637365d6c
commit
a7928bf14c
@ -10,8 +10,9 @@
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import six
|
||||
import sys
|
||||
if sys.version_info[0] < 3:
|
||||
import six
|
||||
|
||||
archs = list()
|
||||
arch_dict = dict()
|
||||
@ -75,6 +76,7 @@ for arch_xml in archs_xml:
|
||||
name = flag_xml.attributes["compiler"].value
|
||||
if name not in flags: flags[name] = list()
|
||||
flags[name].append(flag_xml.firstChild.data)
|
||||
if sys.version_info[0] < 3:
|
||||
#force kwargs keys to be of type str, not unicode for py25
|
||||
kwargs = dict((str(k), v) for k, v in six.iteritems(kwargs))
|
||||
register_arch(flags=flags, checks=checks, **kwargs)
|
||||
|
@ -8,9 +8,11 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
from __future__ import print_function
|
||||
|
||||
import six
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
if sys.version_info[0] < 3:
|
||||
import six
|
||||
|
||||
from volk_gnsssdr_arch_defs import arch_dict
|
||||
|
||||
@ -64,6 +66,7 @@ for machine_xml in machines_xml:
|
||||
except: pass
|
||||
kwargs['archs'] = kwargs['archs'].split()
|
||||
#force kwargs keys to be of type str, not unicode for py25
|
||||
if sys.version_info[0] < 3:
|
||||
kwargs = dict((str(k), v) for k, v in six.iteritems(kwargs))
|
||||
register_machine(**kwargs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user