Permalink
Browse files

Add is_64bit flag to the env for custom checks

  • Loading branch information...
1 parent 4576a39 commit 109907c155640f3cffe31ce3dfc13ab7c60a1ac3 @chapmanb committed Apr 20, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −0 cloudbio/distribution.py
  2. +1 −4 cloudbio/package/shared.py
@@ -31,6 +31,9 @@ def _setup_distribution_environment():
_cloudman_compatibility(env)
_setup_nixpkgs()
_configure_sudo(env)
+ # allow us to check for packages only available on 64bit machines
+ machine = run("uname -m")
+ env.is_64bit = machine.find("_64") > 0
def _configure_sudo(env):
"""Setup env variable and safe_sudo supporting non-privileged users.
@@ -7,9 +7,6 @@
def _yaml_to_packages(yaml_file, to_install, subs_yaml_file = None):
"""Read a list of packages from a nested YAML configuration file.
"""
- # allow us to check for packages only available on 64bit machines
- machine = run("uname -m")
- is_64bit = machine.find("_64") > 0
env.logger.info("Reading %s" % yaml_file)
with open(yaml_file) as in_handle:
full_data = yaml.load(in_handle)
@@ -35,7 +32,7 @@ def _yaml_to_packages(yaml_file, to_install, subs_yaml_file = None):
for key, val in cur_info.iteritems():
# if we are okay, propagate with the top level key
if key == 'needs_64bit':
- if is_64bit:
+ if env.is_64bit:
data.append((cur_key, val))
elif key.startswith(env.distribution):
if key.endswith(env.dist_name):

0 comments on commit 109907c

Please sign in to comment.