MCPcopy Create free account
hub / github.com/boostorg/build / set_tree

Method set_tree

test/BoostBuild.py:328–344  ·  view source on GitHub ↗
(self, tree_location)

Source from the content-addressed store, hash-verified

326 # Methods that change the working directory's content.
327 #
328 def set_tree(self, tree_location):
329 # It is not possible to remove the current directory.
330 d = os.getcwd()
331 os.chdir(os.path.dirname(self.workdir))
332 shutil.rmtree(self.workdir, ignore_errors=False)
333
334 if not os.path.isabs(tree_location):
335 tree_location = os.path.join(self.original_workdir, tree_location)
336 shutil.copytree(tree_location, self.workdir)
337
338 os.chdir(d)
339 def make_writable(unused, dir, entries):
340 for e in entries:
341 name = os.path.join(dir, e)
342 os.chmod(name, os.stat(name).st_mode | 0o222)
343 for root, _, files in os.walk("."):
344 make_writable(None, root, files)
345
346 def write(self, file, content, wait=True):
347 nfile = self.native_file_name(file)

Callers 15

test_toolsetFunction · 0.95
railsys.pyFile · 0.80
startup_v2.pyFile · 0.80
prebuilt.pyFile · 0.80
project_test3.pyFile · 0.80
project_test4.pyFile · 0.80
example_qt4.pyFile · 0.80
example_gettext.pyFile · 0.80
core_language.pyFile · 0.80
rootless.pyFile · 0.80

Calls

no outgoing calls

Tested by 1

test_toolsetFunction · 0.76