diff --git a/tools/diamond.py b/tools/diamond.py index 5abfd4219..572354d7e 100644 --- a/tools/diamond.py +++ b/tools/diamond.py @@ -26,7 +26,7 @@ class Diamond(tools.Tool): def __init__(self, install_methods=None): if not install_methods: - install_methods = [DownloadAndBuildDiamond(URL, os.path.join(DIAMOND_DIR, 'build', 'diamond'))] + install_methods = [DownloadAndBuildDiamond(URL, os.path.join(DIAMOND_DIR, 'bin', 'diamond'))] super().__init__(install_methods=install_methods) def version(self): @@ -105,14 +105,15 @@ def post_download(self): diamond_dir = os.path.join(self.destination_dir, DIAMOND_DIR) # We should rather have a way to rename self.download_file in # DownloadPackage generically. - shutil.move(os.path.join(self.destination_dir, DIAMOND_COMMIT_DIR), diamond_dir) - build_dir = os.path.join(diamond_dir, 'build') - util.file.mkdir_p(build_dir) + if not os.path.exists(diamond_dir): + shutil.move(os.path.join(self.destination_dir, DIAMOND_COMMIT_DIR), diamond_dir) + build_dir = os.path.join(diamond_dir, 'src') + #util.file.mkdir_p(build_dir) env = os.environ.copy() # The default travis gcc version is 4.6, which is too old to build # diamond properly. if os.environ.get('TRAVIS') == 'true': env['CC'] = 'gcc-4.9' env['CXX'] = 'g++-4.9' - util.misc.run_and_print(['cmake', '..'], env=env, cwd=build_dir) + #util.misc.run_and_print(['cmake', '..'], env=env, cwd=build_dir) util.misc.run_and_print(['make'], env=env, cwd=build_dir) diff --git a/tools/kraken.py b/tools/kraken.py index 1c30f0dac..27142c0ab 100644 --- a/tools/kraken.py +++ b/tools/kraken.py @@ -74,7 +74,8 @@ def post_download(self): env['PATH'] = '{}:{}'.format(os.path.dirname(yaggo_path), env['PATH']) jellyfish_dir = os.path.join(self.destination_dir, JELLYFISH_DIR) - shutil.move(os.path.join(self.destination_dir, JELLYFISH_COMMIT_DIR), jellyfish_dir) + if not os.path.exists(jellyfish_dir): + shutil.move(os.path.join(self.destination_dir, JELLYFISH_COMMIT_DIR), jellyfish_dir) install_dir = os.path.join(jellyfish_dir, 'local') util.file.replace_in_file( @@ -159,7 +160,8 @@ def post_download(self): env['PATH'] = '{}:{}'.format(os.path.dirname(jellyfish_path), env['PATH']) kraken_dir = os.path.join(self.destination_dir, KRAKEN_DIR) - shutil.move(os.path.join(self.destination_dir, KRAKEN_COMMIT_DIR), kraken_dir) + if not os.path.exists(kraken_dir): + shutil.move(os.path.join(self.destination_dir, KRAKEN_COMMIT_DIR), kraken_dir) libexec_dir = os.path.join(kraken_dir, 'libexec') bin_dir = os.path.join(kraken_dir, 'bin') util.misc.run_and_print(['./install_kraken.sh', 'libexec'], cwd=kraken_dir, env=env)