-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Docker updated to use local files rather than pull from pypi * Enhanced installation of Google Cloud SDK and ensured its availability to subprocesses * Fixed a broken test
- Loading branch information
Showing
7 changed files
with
91 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
* | ||
!Dockerfile | ||
!firecloud | ||
!LICENSE | ||
!README | ||
!requirements.txt | ||
!setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
FROM python:2.7.15-slim | ||
|
||
COPY . /fiss | ||
|
||
RUN set -ex \ | ||
&& apt-get update && apt-get install -y --no-install-recommends curl \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& pip install --no-cache-dir -U --upgrade-strategy eager firecloud | ||
&& pip install --no-cache-dir -U --upgrade-strategy eager /fiss \ | ||
&& rm -rf /fiss | ||
|
||
CMD ["fissfc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Package version | ||
__version__ = "0.16.12" | ||
__version__ = "0.16.13" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import os | ||
|
||
# Based on https://stackoverflow.com/a/379535 | ||
def which(program): | ||
"""Find given program on system PATH. Works for both *NIX and Windows""" | ||
def is_exe(fpath): | ||
return os.path.exists(fpath) and os.access(fpath, os.X_OK) and os.path.isfile(fpath) | ||
|
||
def ext_candidates(fpath): | ||
yield fpath | ||
# Handle windows executable extensions | ||
for ext in os.environ.get("PATHEXT", "").split(os.pathsep): | ||
if ext: yield fpath + ext | ||
|
||
fpath, _ = os.path.split(program) | ||
if fpath and is_exe(program): | ||
return program | ||
else: | ||
for path in os.environ["PATH"].split(os.pathsep): | ||
exe_file = os.path.join(path, program) | ||
for candidate in ext_candidates(exe_file): | ||
if is_exe(candidate): | ||
return candidate | ||
|
||
return None | ||
|
||
def __ensure_gcloud(): | ||
"""The *NIX installer is not guaranteed to add the google cloud sdk to the | ||
user's PATH (the Windows installer does). This ensures that if the default | ||
directory for the executables exists, it is added to the PATH for the | ||
duration of this package's use.""" | ||
if which('gcloud') is None: | ||
gcloud_path = os.path.join(os.path.expanduser('~'), | ||
'google-cloud-sdk', 'bin') | ||
env_path = os.getenv('PATH') | ||
if os.path.isdir(gcloud_path): | ||
if env_path is not None: | ||
os.environ['PATH'] = gcloud_path + os.pathsep + env_path | ||
else: | ||
os.environ['PATH'] = gcloud_path | ||
|
||
__ensure_gcloud() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters