style: bring packages in compliance with pep8-naming
This commit is contained in:
@@ -217,10 +217,10 @@ def bjam_python_line(self, spec):
|
||||
spec['python'].libs[0]
|
||||
)
|
||||
|
||||
def determine_bootstrap_options(self, spec, withLibs, options):
|
||||
boostToolsetId = self.determine_toolset(spec)
|
||||
options.append('--with-toolset=%s' % boostToolsetId)
|
||||
options.append("--with-libraries=%s" % ','.join(withLibs))
|
||||
def determine_bootstrap_options(self, spec, with_libs, options):
|
||||
boost_toolset_id = self.determine_toolset(spec)
|
||||
options.append('--with-toolset=%s' % boost_toolset_id)
|
||||
options.append("--with-libraries=%s" % ','.join(with_libs))
|
||||
|
||||
if '+python' in spec:
|
||||
options.append('--with-python=%s' % spec['python'].command.path)
|
||||
@@ -234,7 +234,7 @@ def determine_bootstrap_options(self, spec, withLibs, options):
|
||||
# error: duplicate initialization of intel-linux with the following parameters: # noqa
|
||||
# error: version = <unspecified>
|
||||
# error: previous initialization at ./user-config.jam:1
|
||||
f.write("using {0} : : {1} ;\n".format(boostToolsetId,
|
||||
f.write("using {0} : : {1} ;\n".format(boost_toolset_id,
|
||||
spack_cxx))
|
||||
|
||||
if '+mpi' in spec:
|
||||
@@ -292,16 +292,16 @@ def determine_b2_options(self, spec, options):
|
||||
'-s', 'ZLIB_INCLUDE=%s' % spec['zlib'].prefix.include,
|
||||
'-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib])
|
||||
|
||||
linkTypes = ['static']
|
||||
link_types = ['static']
|
||||
if '+shared' in spec:
|
||||
linkTypes.append('shared')
|
||||
link_types.append('shared')
|
||||
|
||||
threadingOpts = []
|
||||
threading_opts = []
|
||||
if '+multithreaded' in spec:
|
||||
threadingOpts.append('multi')
|
||||
threading_opts.append('multi')
|
||||
if '+singlethreaded' in spec:
|
||||
threadingOpts.append('single')
|
||||
if not threadingOpts:
|
||||
threading_opts.append('single')
|
||||
if not threading_opts:
|
||||
raise RuntimeError("At least one of {singlethreaded, " +
|
||||
"multithreaded} must be enabled")
|
||||
|
||||
@@ -310,13 +310,13 @@ def determine_b2_options(self, spec, options):
|
||||
elif '+versionedlayout' in spec:
|
||||
layout = 'versioned'
|
||||
else:
|
||||
if len(threadingOpts) > 1:
|
||||
if len(threading_opts) > 1:
|
||||
raise RuntimeError("Cannot build both single and " +
|
||||
"multi-threaded targets with system layout")
|
||||
layout = 'system'
|
||||
|
||||
options.extend([
|
||||
'link=%s' % ','.join(linkTypes),
|
||||
'link=%s' % ','.join(link_types),
|
||||
'--layout=%s' % layout
|
||||
])
|
||||
|
||||
@@ -352,7 +352,7 @@ def determine_b2_options(self, spec, options):
|
||||
if cxxflags:
|
||||
options.append('cxxflags="{0}"'.format(' '.join(cxxflags)))
|
||||
|
||||
return threadingOpts
|
||||
return threading_opts
|
||||
|
||||
def add_buildopt_symlinks(self, prefix):
|
||||
with working_dir(prefix.lib):
|
||||
@@ -371,11 +371,11 @@ def install(self, spec, prefix):
|
||||
force_symlink('/usr/bin/libtool', join_path(newdir, 'libtool'))
|
||||
env['PATH'] = newdir + ':' + env['PATH']
|
||||
|
||||
withLibs = list()
|
||||
with_libs = list()
|
||||
for lib in Boost.all_libs:
|
||||
if "+{0}".format(lib) in spec:
|
||||
withLibs.append(lib)
|
||||
if not withLibs:
|
||||
with_libs.append(lib)
|
||||
if not with_libs:
|
||||
# if no libraries are specified for compilation, then you dont have
|
||||
# to configure/build anything, just copy over to the prefix
|
||||
# directory.
|
||||
@@ -387,19 +387,19 @@ def install(self, spec, prefix):
|
||||
|
||||
# Remove libraries that the release version does not support
|
||||
if not spec.satisfies('@1.54.0:'):
|
||||
withLibs.remove('log')
|
||||
with_libs.remove('log')
|
||||
if not spec.satisfies('@1.53.0:'):
|
||||
withLibs.remove('atomic')
|
||||
with_libs.remove('atomic')
|
||||
if not spec.satisfies('@1.48.0:'):
|
||||
withLibs.remove('locale')
|
||||
with_libs.remove('locale')
|
||||
if not spec.satisfies('@1.47.0:'):
|
||||
withLibs.remove('chrono')
|
||||
with_libs.remove('chrono')
|
||||
if not spec.satisfies('@1.43.0:'):
|
||||
withLibs.remove('random')
|
||||
with_libs.remove('random')
|
||||
if not spec.satisfies('@1.39.0:'):
|
||||
withLibs.remove('exception')
|
||||
with_libs.remove('exception')
|
||||
if '+graph' in spec and '+mpi' in spec:
|
||||
withLibs.append('graph_parallel')
|
||||
with_libs.append('graph_parallel')
|
||||
|
||||
# to make Boost find the user-config.jam
|
||||
env['BOOST_BUILD_PATH'] = self.stage.source_path
|
||||
@@ -407,7 +407,7 @@ def install(self, spec, prefix):
|
||||
bootstrap = Executable('./bootstrap.sh')
|
||||
|
||||
bootstrap_options = ['--prefix=%s' % prefix]
|
||||
self.determine_bootstrap_options(spec, withLibs, bootstrap_options)
|
||||
self.determine_bootstrap_options(spec, with_libs, bootstrap_options)
|
||||
|
||||
bootstrap(*bootstrap_options)
|
||||
|
||||
@@ -426,13 +426,13 @@ def install(self, spec, prefix):
|
||||
self.stage.source_path, 'user-config.jam')
|
||||
]
|
||||
|
||||
threadingOpts = self.determine_b2_options(spec, b2_options)
|
||||
threading_opts = self.determine_b2_options(spec, b2_options)
|
||||
|
||||
b2('--clean')
|
||||
|
||||
# In theory it could be done on one call but it fails on
|
||||
# Boost.MPI if the threading options are not separated.
|
||||
for threadingOpt in threadingOpts:
|
||||
for threadingOpt in threading_opts:
|
||||
b2('install', 'threading=%s' % threadingOpt, *b2_options)
|
||||
|
||||
if '+multithreaded' in spec and '~taggedlayout' in spec:
|
||||
|
Reference in New Issue
Block a user