Skip to content

Commit

Permalink
Add python3 support
Browse files Browse the repository at this point in the history
Since cpython 2 has bugs that won't be fixed on Windows, we have to move
to python 3

Change-Id: I765f17008d1470d6eacb69d259211847a5fbecaf
Partial-Bug: #1737177
  • Loading branch information
Michal Clapinski committed Apr 17, 2018
1 parent 83b7060 commit 499694a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions lib/rapidjson/SConscript
Expand Up @@ -40,11 +40,9 @@ rapidjson_headers = [

]

rapidjson_headers = map(
lambda hdr: Command('#build/include/' + hdr, [], \
Copy("$TARGET", \
File('#third_party/rapidjson/include/' + hdr))),
rapidjson_headers)
for hdr in rapidjson_headers:
Command('#build/include/' + hdr, [], \
Copy("$TARGET", File('#third_party/rapidjson/include/' + hdr)))

# Local Variables:
# mode: python
Expand Down
4 changes: 2 additions & 2 deletions src/vnsw/agent/SConscript
Expand Up @@ -31,7 +31,7 @@ env.Prepend(CPPPATH = env['TOP'] + '/tools/sandesh/library/common')

# Function to append TOP level directory
def AddTopDir(list):
return map(lambda x: Dir(env['TOP'] + '/' + x).abspath, list)
return [Dir(env['TOP'] + '/' + x).abspath for x in list]

cpppath = [
'',
Expand Down Expand Up @@ -63,7 +63,7 @@ env.Prepend(CPPPATH = AddTopDir(cpppath))
# Build LIBPATH
##########################################################################
def MapBuildDir(list):
return map(lambda x: Dir('../../' + x).abspath, list)
return [Dir('../../' + x).abspath for x in list]

env.Append(LIBPATH = MapBuildDir([
'base',
Expand Down
6 changes: 3 additions & 3 deletions src/vnsw/agent/contrail/SConscript
Expand Up @@ -29,7 +29,7 @@ buildinfo_dep_libs = [
]

def MapBuildCmnLib(list):
return map(lambda x: File('../../../' + x).abspath, list)
return [File('../../../' + x).abspath for x in list]

# Common contrail libraries
buildinfo_dep_libs += MapBuildCmnLib([
Expand All @@ -55,7 +55,7 @@ buildinfo_dep_libs += MapBuildCmnLib([
])

def MapBuildAgentLib(list):
return map(lambda x: File('../' + x).abspath, list)
return [File('../' + x).abspath for x in list]

# agent libraries
buildinfo_dep_libs += MapBuildAgentLib([
Expand Down Expand Up @@ -84,7 +84,7 @@ env.GenerateBuildInfoCode(
target = ['buildinfo.h', 'buildinfo.cc'],
source = [],
path=str(Dir('.').abspath))
build_obj = map(lambda x : env.Object(x), ['buildinfo.cc'])
build_obj = [env.Object('buildinfo.cc')]

# Add contrail-vrouter-agent specific libraries
env.Prepend(LIBS = AgentEnv['CONTRAIL_LIBS'])
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/services/multicast/SConscript
Expand Up @@ -14,7 +14,7 @@ env = AgentEnv.Clone()

# Function to append TOP level directory
def AddTopDir(list):
return map(lambda x: Dir('./' + x).abspath, list)
return [Dir('./' + x).abspath for x in list]

asdf
cpppath = [
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/test/SConscript
Expand Up @@ -16,7 +16,7 @@ env = AgentEnv.Clone()
AgentEnv.MakeTestEnv(env)

targets = env.IFMapAutogen('test_cfg.xsd')
lib_srcs = filter(lambda x: re.match(r'(.*)\.cc$', x.abspath), targets)
lib_srcs = [x for x in targets if re.match(r'(.*)\.cc$', x.abspath)]
env.Library('ifmap_test', lib_srcs)
env.Library('control_node_mock', 'control_node_mock.cc');
env.Library('agent_test_buildinfo', 'test_buildinfo.cc')
Expand Down

0 comments on commit 499694a

Please sign in to comment.