File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 4848TOOLS_DIR = pathlib .Path (__file__ ).resolve ().parent
4949REPO_ROOT = TOOLS_DIR .parent
5050
51+ def overlay (from_root , to_root ):
52+ for from_path in pathlib .Path (from_root ).rglob ('*' ):
53+ relpath = from_path .relative_to (from_root )
54+ to_path = to_root / relpath
55+ #to_path.parent.mkdir(parents=True, exist_ok=True)
56+ if from_path .is_file ():
57+ assert not to_path .exists ()
58+ shutil .copyfile (from_path , to_path )
59+ else :
60+ to_path .mkdir (exist_ok = True )
5161
5262def main (unused_argv ):
5363 merged_source = pathlib .Path (tempfile .mkdtemp ())
5464 (merged_source / 'java/org' ).mkdir (parents = True )
5565
5666 shutil .copytree (REPO_ROOT / 'tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/' ,
5767 merged_source / 'java/org/tensorflow' )
68+ overlay (REPO_ROOT / 'tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow' ,
69+ merged_source / 'java/org/tensorflow' )
5870 shutil .copytree (REPO_ROOT / 'tensorflow-framework/src/main/java/org/tensorflow/framework' ,
5971 merged_source / 'java/org/tensorflow/framework' )
6072 shutil .copytree (REPO_ROOT / 'ndarray/src/main/java/org/tensorflow/ndarray' ,
You can’t perform that action at this time.
0 commit comments