|
8 | 8 | from planemo.io import shell |
9 | 9 |
|
10 | 10 | SETUP_FILE_NAME = "setup_custom_dependencies.bash" |
11 | | -SAMTOOLS_URL = ( |
12 | | - "http://archive.ubuntu.com/ubuntu/pool/universe/" |
13 | | - "s/samtools/samtools_0.1.19-1_amd64.deb" |
14 | | -) |
15 | | - |
16 | | -FIX_EGGS_DIR = 'mkdir -p "$HOME/.python-eggs"; chmod 700 "$HOME/.python-eggs"' |
17 | | -# samtools essentially required by Galaxy |
18 | | -INSTALL_SAMTOOLS = ( |
19 | | - "wget %s; " |
20 | | - "sudo dpkg -i samtools_0.1.19-1_amd64.deb" |
21 | | -) % SAMTOOLS_URL |
| 11 | +SAMTOOLS_DEB = 'samtools_0.1.19-1_amd64.deb' |
| 12 | +SAMTOOLS_URL = "http://archive.ubuntu.com/ubuntu/pool/universe/s/samtools/%s" % SAMTOOLS_DEB |
22 | 13 |
|
23 | 14 | BUILD_ENVIRONMENT_TEMPLATE = """ |
24 | 15 | export PATH=$PATH:${BUILD_BIN_DIR} |
@@ -56,8 +47,14 @@ def cli(ctx): |
56 | 47 | ) |
57 | 48 | open(build_env_path, "a").write(build_env) |
58 | 49 |
|
59 | | - shell(FIX_EGGS_DIR) |
60 | | - shell(INSTALL_SAMTOOLS) |
| 50 | + eggs_dir = os.path.join(os.getenv('HOME'), '.python-eggs') |
| 51 | + if not os.path.exists(eggs_dir): |
| 52 | + os.makedirs(eggs_dir, 0o700) |
| 53 | + else: |
| 54 | + os.chmod(eggs_dir, 0o700) |
| 55 | + # samtools essentially required by Galaxy |
| 56 | + shell(['wget', SAMTOOLS_URL]) |
| 57 | + shell(['sudo', 'dpkg', '-i', SAMTOOLS_DEB]) |
61 | 58 | setup_file = os.path.join(build_travis_dir, SETUP_FILE_NAME) |
62 | 59 | if os.path.exists(setup_file): |
63 | 60 | shell( |
|
0 commit comments