|
29 | 29 | kill_pid_file, |
30 | 30 | shell, |
31 | 31 | shell_join, |
| 32 | + untar_to, |
32 | 33 | wait_on, |
33 | 34 | warn, |
34 | 35 | write_file, |
@@ -185,11 +186,6 @@ class = StreamHandler |
185 | 186 | DEFAULT_GALAXY_SOURCE = "https://github.com/galaxyproject/galaxy" |
186 | 187 | CWL_GALAXY_SOURCE = "https://github.com/common-workflow-language/galaxy" |
187 | 188 |
|
188 | | -# TODO: Mac-y curl variant of this. |
189 | | -DOWNLOAD_GALAXY = ( |
190 | | - "wget -q https://codeload.github.com/galaxyproject/galaxy/tar.gz/" |
191 | | -) |
192 | | - |
193 | 189 | DATABASE_LOCATION_TEMPLATE = "sqlite:///%s?isolation_level=IMMEDIATE" |
194 | 190 |
|
195 | 191 | COMMAND_STARTUP_COMMAND = "./scripts/common_startup.sh ${COMMON_STARTUP_ARGS}" |
@@ -1082,18 +1078,17 @@ def _install_galaxy(ctx, galaxy_root, env, kwds): |
1082 | 1078 |
|
1083 | 1079 |
|
1084 | 1080 | def _install_galaxy_via_download(ctx, galaxy_root, env, kwds): |
1085 | | - tmpdir = mkdtemp() |
1086 | 1081 | branch = _galaxy_branch(kwds) |
1087 | | - command = DOWNLOAD_GALAXY + "%s -O - | tar -C '%s' -xvz | tail && mv '%s' '%s'" % \ |
1088 | | - (branch, tmpdir, os.path.join(tmpdir, 'galaxy-' + branch), galaxy_root) |
1089 | | - _install_with_command(ctx, command, galaxy_root, env, kwds) |
| 1082 | + untar_to("https://codeload.github.com/galaxyproject/galaxy/tar.gz/" + branch, tar_args=['-xvzf', '-', 'galaxy-' + branch], dest_dir=galaxy_root) |
| 1083 | + _install_with_command(ctx, galaxy_root, env, kwds) |
1090 | 1084 |
|
1091 | 1085 |
|
1092 | 1086 | def _install_galaxy_via_git(ctx, galaxy_root, env, kwds): |
1093 | 1087 | gx_repo = _ensure_galaxy_repository_available(ctx, kwds) |
1094 | 1088 | branch = _galaxy_branch(kwds) |
1095 | 1089 | command = git.command_clone(ctx, gx_repo, galaxy_root, branch=branch) |
1096 | | - _install_with_command(ctx, command, galaxy_root, env, kwds) |
| 1090 | + shell(command, env=env) |
| 1091 | + _install_with_command(ctx, galaxy_root, env, kwds) |
1097 | 1092 |
|
1098 | 1093 |
|
1099 | 1094 | def _build_eggs_cache(ctx, env, kwds): |
@@ -1128,17 +1123,15 @@ def _galaxy_source(kwds): |
1128 | 1123 | return source |
1129 | 1124 |
|
1130 | 1125 |
|
1131 | | -def _install_with_command(ctx, command, galaxy_root, env, kwds): |
| 1126 | +def _install_with_command(ctx, galaxy_root, env, kwds): |
1132 | 1127 | setup_venv_command = setup_venv(ctx, kwds) |
1133 | 1128 | env['__PYVENV_LAUNCHER__'] = '' |
1134 | 1129 | install_cmd = shell_join( |
1135 | | - command, |
1136 | | - ['cd', galaxy_root], |
1137 | 1130 | setup_venv_command, |
1138 | 1131 | setup_common_startup_args(), |
1139 | 1132 | COMMAND_STARTUP_COMMAND, |
1140 | 1133 | ) |
1141 | | - shell(install_cmd, env=env) |
| 1134 | + shell(install_cmd, cwd=galaxy_root, env=env) |
1142 | 1135 |
|
1143 | 1136 |
|
1144 | 1137 | def _ensure_galaxy_repository_available(ctx, kwds): |
|
0 commit comments